summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-sizing/parsing
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-sizing/parsing')
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/box-sizing-computed.html19
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/box-sizing-invalid.html24
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/box-sizing-valid.html18
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/height-invalid.html21
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/height-valid.html28
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/max-height-computed.html37
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/max-height-invalid.html21
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/max-height-valid.html28
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/max-width-computed.html37
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/max-width-invalid.html21
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/max-width-valid.html28
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/min-height-computed.html36
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/min-height-invalid.html32
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/min-height-valid.html28
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/min-width-computed.html36
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/min-width-invalid.html32
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/min-width-valid.html28
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/width-invalid.html21
-rw-r--r--testing/web-platform/tests/css/css-sizing/parsing/width-valid.html28
19 files changed, 523 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-computed.html b/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-computed.html
new file mode 100644
index 0000000000..468b9cbe3e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-computed.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing: getComputedStyle().boxSizing</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-box-sizing">
+<meta name="assert" content="box-sizing computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("box-sizing", "content-box");
+test_computed_value("box-sizing", "border-box");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-invalid.html b/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-invalid.html
new file mode 100644
index 0000000000..02d57797ea
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-invalid.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing box-sizing with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-box-sizing">
+<meta name="assert" content="box-sizing supports only the grammar 'content-box | border-box'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("box-sizing", "margin-box");
+test_invalid_value("box-sizing", "padding-box");
+test_invalid_value("box-sizing", "fill-box");
+test_invalid_value("box-sizing", "stroke-box");
+test_invalid_value("box-sizing", "view-box");
+
+test_invalid_value("box-sizing", "content-box border-box");
+test_invalid_value("box-sizing", "content-box, border-box");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-valid.html b/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-valid.html
new file mode 100644
index 0000000000..8f0b8099cf
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/box-sizing-valid.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing box-sizing with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-box-sizing">
+<meta name="assert" content="box-sizing supports the full grammar 'content-box | border-box'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("box-sizing", "content-box");
+test_valid_value("box-sizing", "border-box");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/height-invalid.html b/testing/web-platform/tests/css/css-sizing/parsing/height-invalid.html
new file mode 100644
index 0000000000..14dd0b9b71
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/height-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing height with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-height">
+<meta name="assert" content="height supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("height", "none");
+test_invalid_value("height", "min-content max-content");
+
+test_invalid_value("height", "-10%");
+test_invalid_value("height", "-0.5em");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/height-valid.html b/testing/web-platform/tests/css/css-sizing/parsing/height-valid.html
new file mode 100644
index 0000000000..cd54020d72
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/height-valid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing height with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-height">
+<meta name="assert" content="height supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("height", "auto");
+test_valid_value("height", "min-content");
+test_valid_value("height", "max-content");
+
+test_valid_value("height", "0", "0px");
+test_valid_value("height", "10%");
+test_valid_value("height", "0.5em");
+test_valid_value("height", "calc(10% - 0.5em)");
+
+test_valid_value("height", "fit-content(10%)");
+test_valid_value("height", "fit-content(0.5em)");
+test_valid_value("height", "fit-content(calc(10% - 0.5em))");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/max-height-computed.html b/testing/web-platform/tests/css/css-sizing/parsing/max-height-computed.html
new file mode 100644
index 0000000000..c99b28a7b0
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/max-height-computed.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS basic box model: getComputedStyle().maxHeight</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height">
+<meta name="assert" content="max-height computed value is as specified, with <length-percentage> values computed">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("max-height", "none");
+test_computed_value("max-height", "min-content");
+test_computed_value("max-height", "max-content");
+
+test_computed_value("max-height", "10px");
+test_computed_value("max-height", "20%");
+
+test_computed_value('max-height', 'calc(10% + 40px)');
+test_computed_value('max-height', 'calc(10px - 0.5em)', '0px');
+test_computed_value('max-height', 'calc(10px + 0.5em)', '30px');
+
+test_computed_value("max-height", "fit-content(10px)");
+test_computed_value("max-height", "fit-content(20%)");
+test_computed_value("max-height", "fit-content(calc(10% + 40px))");
+test_computed_value("max-height", "fit-content(calc(10px + 0.5em))", "fit-content(30px)");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/max-height-invalid.html b/testing/web-platform/tests/css/css-sizing/parsing/max-height-invalid.html
new file mode 100644
index 0000000000..3798bb31c5
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/max-height-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-height with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height">
+<meta name="assert" content="max-height supports only the grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("max-height", "auto");
+test_invalid_value("max-height", "min-content max-content");
+
+test_invalid_value("max-height", "-10%");
+test_invalid_value("max-height", "-0.5em");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/max-height-valid.html b/testing/web-platform/tests/css/css-sizing/parsing/max-height-valid.html
new file mode 100644
index 0000000000..5ece99de92
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/max-height-valid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-height with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height">
+<meta name="assert" content="max-height supports the full grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("max-height", "none");
+test_valid_value("max-height", "min-content");
+test_valid_value("max-height", "max-content");
+
+test_valid_value("max-height", "0", "0px");
+test_valid_value("max-height", "10%");
+test_valid_value("max-height", "0.5em");
+test_valid_value("max-height", "calc(10% - 0.5em)");
+
+test_valid_value("max-height", "fit-content(10%)");
+test_valid_value("max-height", "fit-content(0.5em)");
+test_valid_value("max-height", "fit-content(calc(10% - 0.5em))");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/max-width-computed.html b/testing/web-platform/tests/css/css-sizing/parsing/max-width-computed.html
new file mode 100644
index 0000000000..be92bcdd7f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/max-width-computed.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS basic box model: getComputedStyle().maxWidth</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-width">
+<meta name="assert" content="max-width computed value is as specified, with <length-percentage> values computed">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("max-width", "none");
+test_computed_value("max-width", "min-content");
+test_computed_value("max-width", "max-content");
+
+test_computed_value("max-width", "10px");
+test_computed_value("max-width", "20%");
+
+test_computed_value('max-width', 'calc(10% + 40px)');
+test_computed_value('max-width', 'calc(10px - 0.5em)', '0px');
+test_computed_value('max-width', 'calc(10px + 0.5em)', '30px');
+
+test_computed_value("max-width", "fit-content(10px)");
+test_computed_value("max-width", "fit-content(20%)");
+test_computed_value("max-width", "fit-content(calc(10% + 40px))");
+test_computed_value("max-width", "fit-content(calc(10px + 0.5em))", "fit-content(30px)");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/max-width-invalid.html b/testing/web-platform/tests/css/css-sizing/parsing/max-width-invalid.html
new file mode 100644
index 0000000000..86e8528338
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/max-width-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-width with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-width">
+<meta name="assert" content="max-width supports only the grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("max-width", "auto");
+test_invalid_value("max-width", "min-content max-content");
+
+test_invalid_value("max-width", "-10%");
+test_invalid_value("max-width", "-0.5em");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/max-width-valid.html b/testing/web-platform/tests/css/css-sizing/parsing/max-width-valid.html
new file mode 100644
index 0000000000..a7ac008e00
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/max-width-valid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing max-width with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-width">
+<meta name="assert" content="max-width supports the full grammar 'none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("max-width", "none");
+test_valid_value("max-width", "min-content");
+test_valid_value("max-width", "max-content");
+
+test_valid_value("max-width", "0", "0px");
+test_valid_value("max-width", "10%");
+test_valid_value("max-width", "0.5em");
+test_valid_value("max-width", "calc(10% - 0.5em)");
+
+test_valid_value("max-width", "fit-content(10%)");
+test_valid_value("max-width", "fit-content(0.5em)");
+test_valid_value("max-width", "fit-content(calc(10% - 0.5em))");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/min-height-computed.html b/testing/web-platform/tests/css/css-sizing/parsing/min-height-computed.html
new file mode 100644
index 0000000000..442da9d777
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/min-height-computed.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS basic box model: getComputedStyle().minHeight</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-height">
+<meta name="assert" content="min-height computed value is as specified, with <length-percentage> values computed">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("min-height", "min-content");
+test_computed_value("min-height", "max-content");
+
+test_computed_value("min-height", "10px");
+test_computed_value("min-height", "20%");
+
+test_computed_value('min-height', 'calc(10% + 40px)');
+test_computed_value('min-height', 'calc(10px - 0.5em)', '0px');
+test_computed_value('min-height', 'calc(10px + 0.5em)', '30px');
+
+test_computed_value("min-height", "fit-content(10px)");
+test_computed_value("min-height", "fit-content(20%)");
+test_computed_value("min-height", "fit-content(calc(10% + 40px))");
+test_computed_value("min-height", "fit-content(calc(10px + 0.5em))", "fit-content(30px)");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/min-height-invalid.html b/testing/web-platform/tests/css/css-sizing/parsing/min-height-invalid.html
new file mode 100644
index 0000000000..8df96e22d4
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/min-height-invalid.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-height with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-height">
+<meta name="assert" content="min-height supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("min-height", "none");
+test_invalid_value("min-height", "complex");
+
+test_invalid_value("min-height", "-10%");
+test_invalid_value("min-height", "-0.5em");
+test_invalid_value("min-height", "60");
+
+test_invalid_value("min-height", "10px 20%");
+test_invalid_value("min-height", "max-content 10px");
+test_invalid_value("min-height", "min-content max-content");
+
+// The following were previously supported by a min-height definition in
+// https://drafts.csswg.org/css-box-3/
+test_invalid_value("min-height", "available");
+test_invalid_value("min-height", "10px border-box");
+test_invalid_value("min-height", "content-box 20%");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/min-height-valid.html b/testing/web-platform/tests/css/css-sizing/parsing/min-height-valid.html
new file mode 100644
index 0000000000..8450a000ce
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/min-height-valid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-height with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-height">
+<meta name="assert" content="min-height supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("min-height", "auto");
+test_valid_value("min-height", "min-content");
+test_valid_value("min-height", "max-content");
+
+test_valid_value("min-height", "0", "0px");
+test_valid_value("min-height", "10%");
+test_valid_value("min-height", "0.5em");
+test_valid_value("min-height", "calc(10% - 0.5em)");
+
+test_valid_value("min-height", "fit-content(10%)");
+test_valid_value("min-height", "fit-content(0.5em)");
+test_valid_value("min-height", "fit-content(calc(10% - 0.5em))");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/min-width-computed.html b/testing/web-platform/tests/css/css-sizing/parsing/min-width-computed.html
new file mode 100644
index 0000000000..74b2aedecf
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/min-width-computed.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS basic box model: getComputedStyle().minWidth</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-width">
+<meta name="assert" content="min-width computed value is as specified, with <length-percentage> values computed">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+test_computed_value("min-width", "min-content");
+test_computed_value("min-width", "max-content");
+
+test_computed_value("min-width", "10px");
+test_computed_value("min-width", "20%");
+
+test_computed_value('min-width', 'calc(10% + 40px)');
+test_computed_value('min-width', 'calc(10px - 0.5em)', '0px');
+test_computed_value('min-width', 'calc(10px + 0.5em)', '30px');
+
+test_computed_value("min-width", "fit-content(10px)");
+test_computed_value("min-width", "fit-content(20%)");
+test_computed_value("min-width", "fit-content(calc(10% + 40px))");
+test_computed_value("min-width", "fit-content(calc(10px + 0.5em))", "fit-content(30px)");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/min-width-invalid.html b/testing/web-platform/tests/css/css-sizing/parsing/min-width-invalid.html
new file mode 100644
index 0000000000..443ccc3107
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/min-width-invalid.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-width with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-width">
+<meta name="assert" content="min-width supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("min-width", "none");
+test_invalid_value("min-width", "complex");
+
+test_invalid_value("min-width", "-10%");
+test_invalid_value("min-width", "-0.5em");
+test_invalid_value("min-width", "60");
+
+test_invalid_value("min-width", "10px 20%");
+test_invalid_value("min-width", "max-content 10px");
+test_invalid_value("min-width", "min-content max-content");
+
+// The following were previously supported by a min-width definition in
+// https://drafts.csswg.org/css-box-3/
+test_invalid_value("min-width", "available");
+test_invalid_value("min-width", "10px border-box");
+test_invalid_value("min-width", "content-box 20%");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/min-width-valid.html b/testing/web-platform/tests/css/css-sizing/parsing/min-width-valid.html
new file mode 100644
index 0000000000..5fff5d97b8
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/min-width-valid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing min-width with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-min-width">
+<meta name="assert" content="min-width supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("min-width", "auto");
+test_valid_value("min-width", "min-content");
+test_valid_value("min-width", "max-content");
+
+test_valid_value("min-width", "0", "0px");
+test_valid_value("min-width", "10%");
+test_valid_value("min-width", "0.5em");
+test_valid_value("min-width", "calc(10% - 0.5em)");
+
+test_valid_value("min-width", "fit-content(10%)");
+test_valid_value("min-width", "fit-content(0.5em)");
+test_valid_value("min-width", "fit-content(calc(10% - 0.5em))");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/width-invalid.html b/testing/web-platform/tests/css/css-sizing/parsing/width-invalid.html
new file mode 100644
index 0000000000..6c56d28160
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/width-invalid.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing width with invalid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-width">
+<meta name="assert" content="width supports only the grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_invalid_value("width", "none");
+test_invalid_value("width", "min-content max-content");
+
+test_invalid_value("width", "-10%");
+test_invalid_value("width", "-0.5em");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-sizing/parsing/width-valid.html b/testing/web-platform/tests/css/css-sizing/parsing/width-valid.html
new file mode 100644
index 0000000000..268a89273b
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/parsing/width-valid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Intrinsic & Extrinsic Sizing Test: parsing width with valid values</title>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#propdef-width">
+<meta name="assert" content="width supports the full grammar 'auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+test_valid_value("width", "auto");
+test_valid_value("width", "min-content");
+test_valid_value("width", "max-content");
+
+test_valid_value("width", "0", "0px");
+test_valid_value("width", "10%");
+test_valid_value("width", "0.5em");
+test_valid_value("width", "calc(10% - 0.5em)");
+
+test_valid_value("width", "fit-content(10%)");
+test_valid_value("width", "fit-content(0.5em)");
+test_valid_value("width", "fit-content(calc(10% - 0.5em))");
+</script>
+</body>
+</html>