mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1473378 [wpt PR 11781] - [css-grid] Parse various grid properties, a=testonly
Automatic update from web-platform-testsMerge pull request #11781 from ewilligers/grid-parsing-longhands [css-grid] Parse various grid properties -- wpt-commits: beeef7243be816e41f7322528d0ec4571d0264da wpt-pr: 11781
This commit is contained in:
parent
d18b51151b
commit
f1a9a9bc63
@ -331821,6 +331821,18 @@
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-display/parsing/display-invalid.html": [
|
||||
[
|
||||
"/css/css-display/parsing/display-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-display/parsing/display-valid.html": [
|
||||
[
|
||||
"/css/css-display/parsing/display-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-env/at-supports.tentative.html": [
|
||||
[
|
||||
"/css/css-env/at-supports.tentative.html",
|
||||
@ -334061,6 +334073,66 @@
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-area-invalid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-area-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-area-valid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-area-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-columns-invalid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-auto-columns-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-columns-valid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-auto-columns-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-flow-invalid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-auto-flow-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-flow-valid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-auto-flow-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-rows-invalid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-auto-rows-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-rows-valid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-auto-rows-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-template-areas-invalid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-template-areas-invalid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-grid/parsing/grid-template-areas-valid.html": [
|
||||
[
|
||||
"/css/css-grid/parsing/grid-template-areas-valid.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-images/gradient/color-stops-parsing.html": [
|
||||
[
|
||||
"/css/css-images/gradient/color-stops-parsing.html",
|
||||
@ -529034,6 +529106,14 @@
|
||||
"f8d6e85cee2325f3ae51a950a276430d26c04189",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-display/parsing/display-invalid.html": [
|
||||
"70516ad4901f684b9d0ecd49a82671172fbc8f14",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-display/parsing/display-valid.html": [
|
||||
"efa48350a62dd0210009069475ac9243bba51104",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-display/run-in/META.yml": [
|
||||
"ad40907fb0382fb83be02ad10e05031e284f3b9f",
|
||||
"support"
|
||||
@ -543022,6 +543102,46 @@
|
||||
"29eca9dbc6f5738f7d6f929385453d64dcdf0aea",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-grid/parsing/grid-area-invalid.html": [
|
||||
"b989322775eb7dbf273a3dc3fbb3d1af31f524ba",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-area-valid.html": [
|
||||
"8e7d0d43d1cfac44935593892b67fdb40b179791",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-columns-invalid.html": [
|
||||
"e7a965f34ad35f32589b6fc895d65946812e0749",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-columns-valid.html": [
|
||||
"ba1f5f60d657ebd2629c94b90c971bb081ea7917",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-flow-invalid.html": [
|
||||
"a261e8eba11fd295eb33c9288a7e30f589374331",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-flow-valid.html": [
|
||||
"4270a3df933f372792139cae7c39344ff69482dc",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-rows-invalid.html": [
|
||||
"7fceaa0f1639494847cc06a7f93876992d620b3c",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-auto-rows-valid.html": [
|
||||
"cf63e2b7d52a6fffc5577bc55e37dfd6aa0cd5b8",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-template-areas-invalid.html": [
|
||||
"5bc70c5697a2a642ce80b902851f3687eba901d7",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/parsing/grid-template-areas-valid.html": [
|
||||
"8d8f6823267eea15e987ea89e992f1ed0b2f7726",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-grid/placement/grid-layout-grid-span.html": [
|
||||
"21aad99708c96942c196ada03beaded1d73a1078",
|
||||
"reftest"
|
||||
|
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Display: parsing display with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#display-prop">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-display/#the-display-properties">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-containers">
|
||||
<meta name="assert" content="display supports only the spec grammar.">
|
||||
<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("display", "grid inline-grid");
|
||||
test_invalid_value("display", "none grid");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Display: parsing display with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#display-prop">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-display/#the-display-properties">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-containers">
|
||||
<meta name="assert" content="display supports the full spec grammar.">
|
||||
<meta name="assert" content="display supports the new values 'grid | inline-grid'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// https://drafts.csswg.org/css-grid-1/#grid-containers
|
||||
test_valid_value("display", "grid");
|
||||
test_valid_value("display", "inline-grid");
|
||||
|
||||
// https://drafts.csswg.org/css2/visuren.html#display-prop
|
||||
test_valid_value("display", "inline");
|
||||
test_valid_value("display", "block");
|
||||
test_valid_value("display", "list-item");
|
||||
test_valid_value("display", "inline-block");
|
||||
test_valid_value("display", "table");
|
||||
test_valid_value("display", "inline-table");
|
||||
test_valid_value("display", "table-row-group");
|
||||
test_valid_value("display", "table-header-group");
|
||||
test_valid_value("display", "table-footer-group");
|
||||
test_valid_value("display", "table-row");
|
||||
test_valid_value("display", "table-column-group");
|
||||
test_valid_value("display", "table-column");
|
||||
test_valid_value("display", "table-cell");
|
||||
test_valid_value("display", "table-caption");
|
||||
test_valid_value("display", "none");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-area with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
|
||||
<meta name="assert" content="grid-area supports only the grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
|
||||
<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("grid-area", "'string'");
|
||||
test_invalid_value("grid-row", "1.0");
|
||||
test_invalid_value("grid-column", "1 2");
|
||||
test_invalid_value("grid-row-start", "+-3");
|
||||
test_invalid_value("grid-column-start", "0");
|
||||
test_invalid_value("grid-row-end", "span");
|
||||
test_invalid_value("grid-column-end", "sPaN");
|
||||
test_invalid_value("grid-column-end", '"1st"');
|
||||
test_invalid_value("grid-column-end", "1st");
|
||||
|
||||
test_invalid_value("grid-area", "auto / initial");
|
||||
test_invalid_value("grid-row", "auto / inherit");
|
||||
test_invalid_value("grid-column", "auto / unset");
|
||||
|
||||
test_invalid_value("grid-area", "auto / auto / auto / auto / auto");
|
||||
test_invalid_value("grid-row", "1 / 2 / 3")
|
||||
test_invalid_value("grid-column", "a / b / c");
|
||||
test_invalid_value("grid-row-end", "span 1 / span 2");
|
||||
test_invalid_value("grid-area", "auto 2 auto 4");
|
||||
test_invalid_value("grid-row", "33 -A0 auto");
|
||||
test_invalid_value("grid-row", "auto i 2 j span 3 k");
|
||||
|
||||
|
||||
// https://github.com/w3c/csswg-drafts/issues/2856
|
||||
test_invalid_value("grid-row-end", "1 auto");
|
||||
test_invalid_value("grid-row-end", "span 1 auto");
|
||||
test_invalid_value("grid-row-end", "span auto 1");
|
||||
test_invalid_value("grid-row-end", "1 auto span");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-area with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
|
||||
<meta name="assert" content="grid-area supports the full grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// auto
|
||||
test_valid_value("grid-area", "auto", "auto / auto / auto / auto");
|
||||
test_valid_value("grid-area", "AuTo", "auto / auto / auto / auto");
|
||||
test_valid_value("grid-row", "auto", "auto / auto");
|
||||
test_valid_value("grid-column-end", "AuTo", "auto");
|
||||
|
||||
// <custom-ident>
|
||||
test_valid_value("grid-area", "--a", "--a / --a / --a / --a");
|
||||
test_valid_value("grid-row", "-zπ", "-zπ / -zπ");
|
||||
test_valid_value("grid-row-start", "AZ");
|
||||
test_valid_value("grid-column-start", "-_π");
|
||||
test_valid_value("grid-row-end", "_9");
|
||||
|
||||
|
||||
// <integer> && <custom-ident>?
|
||||
test_valid_value("grid-area", "1", "1 / auto / auto / auto");
|
||||
test_valid_value("grid-area", "+90 -a-", "90 -a- / auto / auto / auto");
|
||||
test_valid_value("grid-row", "az 2", "2 az / auto");
|
||||
test_valid_value("grid-column", "9", "9 / auto");
|
||||
test_valid_value("grid-column", "-19 zA", "-19 zA / auto");
|
||||
test_valid_value("grid-column", "-A0 33", "33 -A0 / auto");
|
||||
test_valid_value("grid-row-start", "-19");
|
||||
test_valid_value("grid-row-start", "9 -Z_");
|
||||
test_valid_value("grid-column-start", "+90", "90");
|
||||
test_valid_value("grid-column-start", "Z -44", "-44 Z");
|
||||
test_valid_value("grid-row-end", "1 -πA");
|
||||
test_valid_value("grid-column-end", "π_ +5", "5 π_");
|
||||
|
||||
// span && [ <integer> || <custom-ident> ]
|
||||
test_valid_value("grid-area", "span 2 i", "span 2 i / auto / auto / auto");
|
||||
test_valid_value("grid-area", "i 2 SpAn", "span 2 i / auto / auto / auto");
|
||||
test_valid_value("grid-row", "span 2", "span 2 / auto");
|
||||
test_valid_value("grid-column", "i SpAn", "span i / auto");
|
||||
test_valid_value("grid-row-start", "span i", "span i");
|
||||
test_valid_value("grid-column-start", "SpAn i 2", "span 2 i");
|
||||
test_valid_value("grid-row-end", "2 i span", "span 2 i");
|
||||
test_valid_value("grid-column-end", "2 SpAn", "span 2");
|
||||
|
||||
// <grid-line> [ / <grid-line> ]{0,3}
|
||||
test_valid_value("grid-area", "auto / i", "auto / i / auto / i");
|
||||
test_valid_value("grid-area", "auto / i / 2 j", "auto / i / 2 j / i");
|
||||
test_valid_value("grid-area", "auto / i / 2 j / span 3 k");
|
||||
test_valid_value("grid-row", "auto / i");
|
||||
test_valid_value("grid-column", "2 j / span 3 k");
|
||||
|
||||
|
||||
// https://github.com/w3c/csswg-drafts/issues/2858
|
||||
// '\\31 st' in Blink, Firefox, '1st' in Edge, '"1st"' in Safari.
|
||||
test_valid_value("grid-column-end", "\\31st", ["\\31 st", "1st", '"1st"']);
|
||||
test_valid_value("grid-column-end", "\\31 st", ["\\31 st", "1st", '"1st"']);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-auto-columns with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns">
|
||||
<meta name="assert" content="grid-auto-columns supports only the grammar '<track-size>+'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// <track-breadth>
|
||||
test_invalid_value("grid-auto-columns", "none");
|
||||
test_invalid_value("grid-auto-columns", "-1px");
|
||||
test_invalid_value("grid-auto-columns", "-4%");
|
||||
|
||||
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||
test_invalid_value("grid-auto-columns", "minmax(1px)");
|
||||
test_invalid_value("grid-auto-columns", "minmax(1px, 2px, 3px)");
|
||||
test_invalid_value("grid-auto-columns", "minmax(5fr, 1px)");
|
||||
test_invalid_value("grid-auto-columns", "minmax(6px, -7%)");
|
||||
test_invalid_value("grid-auto-columns", "minmax(8px, -9fr)");
|
||||
|
||||
// fit-content( <length-percentage> )
|
||||
test_invalid_value("grid-auto-columns", "fit-content(-1px)");
|
||||
test_invalid_value("grid-auto-columns", "fit-content(1px, 2px)");
|
||||
test_invalid_value("grid-auto-columns", "fit-content(1px auto)");
|
||||
|
||||
// <track-size>+
|
||||
test_invalid_value("grid-auto-columns", "2em / 3em");
|
||||
test_invalid_value("grid-auto-columns", "auto, 10%");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-auto-columns with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns">
|
||||
<meta name="assert" content="grid-auto-columns supports the full grammar '<track-size>+'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// <track-breadth>
|
||||
// <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
|
||||
test_valid_value("grid-auto-columns", "1px");
|
||||
test_valid_value("grid-auto-columns", "2em");
|
||||
test_valid_value("grid-auto-columns", "calc(2em + 3ex)");
|
||||
test_valid_value("grid-auto-columns", "4%");
|
||||
test_valid_value("grid-auto-columns", "5fr");
|
||||
test_valid_value("grid-auto-columns", "min-content");
|
||||
test_valid_value("grid-auto-columns", "max-content");
|
||||
test_valid_value("grid-auto-columns", "auto");
|
||||
|
||||
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||
// <inflexible-breadth> = <length-percentage> | min-content | max-content | auto
|
||||
test_valid_value("grid-auto-columns", "minmax(1px, 5fr)");
|
||||
test_valid_value("grid-auto-columns", "minmax(2em, min-content)");
|
||||
test_valid_value("grid-auto-columns", "minmax(calc(2em + 3ex), max-content)");
|
||||
test_valid_value("grid-auto-columns", "minmax(4%, auto)");
|
||||
test_valid_value("grid-auto-columns", "minmax(5vmin, 1px)");
|
||||
test_valid_value("grid-auto-columns", "minmax(min-content, 2em)");
|
||||
test_valid_value("grid-auto-columns", "minmax(max-content, calc(2em + 3ex))");
|
||||
test_valid_value("grid-auto-columns", "minmax(auto, 4%)");
|
||||
|
||||
// fit-content( <length-percentage> )
|
||||
test_valid_value("grid-auto-columns", "fit-content(1px)");
|
||||
test_valid_value("grid-auto-columns", "fit-content(2em)");
|
||||
test_valid_value("grid-auto-columns", "fit-content(calc(2em + 3ex))");
|
||||
test_valid_value("grid-auto-columns", "fit-content(4%)");
|
||||
|
||||
test_valid_value("grid-auto-columns", "0px");
|
||||
test_valid_value("grid-auto-columns", "0%");
|
||||
test_valid_value("grid-auto-columns", "0fr");
|
||||
test_valid_value("grid-auto-columns", "minmax(auto, 0%)");
|
||||
test_valid_value("grid-auto-columns", "fit-content(0px)");
|
||||
|
||||
// <track-size>+
|
||||
test_valid_value("grid-auto-columns", "1px 2px 3px 0px");
|
||||
test_valid_value("grid-auto-columns", "fit-content(1px) minmax(2px, 3px) 4px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-auto-flow with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow">
|
||||
<meta name="assert" content="grid-auto-flow supports only the grammar '[ row | column ] || dense'.">
|
||||
<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("grid-auto-flow", "auto");
|
||||
test_invalid_value("grid-auto-flow", "row dense column");
|
||||
test_invalid_value("grid-auto-flow", "dense row dense");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-auto-flow with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow">
|
||||
<meta name="assert" content="grid-auto-flow supports the full grammar '[ row | column ] || dense'.">
|
||||
<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("grid-auto-flow", "row");
|
||||
test_valid_value("grid-auto-flow", "column");
|
||||
test_valid_value("grid-auto-flow", "row dense");
|
||||
test_valid_value("grid-auto-flow", "dense column", "column dense");
|
||||
|
||||
// Blink/WebKit "dense", Edge/Firefox "row dense"
|
||||
test_valid_value("grid-auto-flow", "dense", ["dense", "row dense"]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-auto-rows with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows">
|
||||
<meta name="assert" content="grid-auto-rows supports only the grammar '<track-size>+'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// <track-breadth>
|
||||
test_invalid_value("grid-auto-rows", "none");
|
||||
test_invalid_value("grid-auto-rows", "-1px");
|
||||
test_invalid_value("grid-auto-rows", "-4%");
|
||||
|
||||
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||
test_invalid_value("grid-auto-rows", "minmax(1px)");
|
||||
test_invalid_value("grid-auto-rows", "minmax(1px, 2px, 3px)");
|
||||
test_invalid_value("grid-auto-rows", "minmax(5fr, 1px)");
|
||||
test_invalid_value("grid-auto-rows", "minmax(6px, -7%)");
|
||||
|
||||
// fit-content( <length-percentage> )
|
||||
test_invalid_value("grid-auto-rows", "fit-content(-1px)");
|
||||
test_invalid_value("grid-auto-rows", "fit-content(1px, 2px)");
|
||||
test_invalid_value("grid-auto-rows", "fit-content(1px auto)");
|
||||
|
||||
// <track-size>+
|
||||
test_invalid_value("grid-auto-rows", "2em / 3em");
|
||||
test_invalid_value("grid-auto-rows", "auto, 10%");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-auto-rows with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows">
|
||||
<meta name="assert" content="grid-auto-rows supports the full grammar '<track-size>+'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// <track-breadth>
|
||||
// <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto
|
||||
test_valid_value("grid-auto-rows", "1px");
|
||||
test_valid_value("grid-auto-rows", "2em");
|
||||
test_valid_value("grid-auto-rows", "calc(2em + 3ex)");
|
||||
test_valid_value("grid-auto-rows", "4%");
|
||||
test_valid_value("grid-auto-rows", "5fr");
|
||||
test_valid_value("grid-auto-rows", "min-content");
|
||||
test_valid_value("grid-auto-rows", "max-content");
|
||||
test_valid_value("grid-auto-rows", "auto");
|
||||
|
||||
// minmax( <inflexible-breadth> , <track-breadth> )
|
||||
// <inflexible-breadth> = <length-percentage> | min-content | max-content | auto
|
||||
test_valid_value("grid-auto-rows", "minmax(1px, 5fr)");
|
||||
test_valid_value("grid-auto-rows", "minmax(2em, min-content)");
|
||||
test_valid_value("grid-auto-rows", "minmax(calc(2em + 3ex), max-content)");
|
||||
test_valid_value("grid-auto-rows", "minmax(4%, auto)");
|
||||
test_valid_value("grid-auto-rows", "minmax(5vmin, 1px)");
|
||||
test_valid_value("grid-auto-rows", "minmax(min-content, 2em)");
|
||||
test_valid_value("grid-auto-rows", "minmax(max-content, calc(2em + 3ex))");
|
||||
test_valid_value("grid-auto-rows", "minmax(auto, 4%)");
|
||||
|
||||
// fit-content( <length-percentage> )
|
||||
test_valid_value("grid-auto-rows", "fit-content(1px)");
|
||||
test_valid_value("grid-auto-rows", "fit-content(2em)");
|
||||
test_valid_value("grid-auto-rows", "fit-content(calc(2em + 3ex))");
|
||||
test_valid_value("grid-auto-rows", "fit-content(4%)");
|
||||
|
||||
test_valid_value("grid-auto-rows", "0px");
|
||||
test_valid_value("grid-auto-rows", "0%");
|
||||
test_valid_value("grid-auto-rows", "0fr");
|
||||
test_valid_value("grid-auto-rows", "minmax(auto, 0%)");
|
||||
test_valid_value("grid-auto-rows", "fit-content(0px)");
|
||||
|
||||
// <track-size>+
|
||||
test_valid_value("grid-auto-rows", "1px 2px 3px 0px");
|
||||
test_valid_value("grid-auto-rows", "fit-content(1px) minmax(2px, 3px) 4px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-template-areas with invalid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-areas">
|
||||
<meta name="assert" content="grid-template-areas supports only the grammar 'none | <string>+'.">
|
||||
<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("grid-template-areas", "auto");
|
||||
test_invalid_value("grid-template-areas", 'none "first"');
|
||||
test_invalid_value("grid-template-areas", '"first" none');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Grid Layout Test: parsing grid-template-areas with valid values</title>
|
||||
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-areas">
|
||||
<meta name="assert" content="grid-template-areas supports the full grammar 'none | <string>+'.">
|
||||
<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("grid-template-areas", "none");
|
||||
test_valid_value("grid-template-areas", '"first"');
|
||||
test_valid_value("grid-template-areas", '"first second"');
|
||||
test_valid_value("grid-template-areas", '"1st 2nd 3rd"');
|
||||
test_valid_value("grid-template-areas", '"first second" "third fourth"');
|
||||
test_valid_value("grid-template-areas", '"first second" "third ." "1st 2nd" "3rd 4th"');
|
||||
|
||||
// Firefox preserves specific whitespace and full stop sequences.
|
||||
// Other browsers consolidate to ' ' and '.'
|
||||
test_valid_value("grid-template-areas", '" a \t b "', '"a b"'); // Fails in Firefox
|
||||
test_valid_value("grid-template-areas", '"c\td"', ['"c d"', '"c\\9 d"']);
|
||||
test_valid_value("grid-template-areas", '"first ..."', ['"first ."', '"first ..."']);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user