diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-grid/parsing/grid-template-shorthand.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-grid/parsing/grid-template-shorthand.html')
-rw-r--r-- | testing/web-platform/tests/css/css-grid/parsing/grid-template-shorthand.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/parsing/grid-template-shorthand.html b/testing/web-platform/tests/css/css-grid/parsing/grid-template-shorthand.html new file mode 100644 index 0000000000..b9165359a7 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/parsing/grid-template-shorthand.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: grid-template sets longhands</title> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template"> +<meta name="assert" content="grid-template supports the full grammar 'none | [ <grid-template-rows> / <grid-template-columns> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/shorthand-testcommon.js"></script> +</head> +<body> +<script> +test_shorthand_value('grid-template', 'none', { + 'grid-template-rows': 'none', + 'grid-template-columns': 'none', + 'grid-template-areas': 'none' +}); + +// <grid-template-rows> / <grid-template-columns> +test_shorthand_value('grid-template', '10px / 20%', { + 'grid-template-rows': '10px', + 'grid-template-columns': '20%', + 'grid-template-areas': 'none' +}); + +test_shorthand_value('grid-template', 'fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))', { + 'grid-template-rows': 'fit-content(calc(-0.5em + 10px))', + 'grid-template-columns': 'fit-content(calc(0.5em + 10px))', + 'grid-template-areas': 'none' +}); + +// [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]? +test_shorthand_value('grid-template', + '[header-top] "a a a" [header-bottom]' + + ' [main-top] "b b b" 1fr [main-bottom]' + + ' / auto 1fr auto', { + 'grid-template-rows': '[header-top] auto [header-bottom main-top] 1fr [main-bottom]', + 'grid-template-columns': 'auto 1fr auto', + 'grid-template-areas': '"a a a" "b b b"' +}); + +test_shorthand_value('grid-template', + ' "a a a"' + + ' "b b b" 1fr' + + '/ auto 1fr auto', { + 'grid-template-rows': 'auto 1fr', + 'grid-template-columns': 'auto 1fr auto', + 'grid-template-areas': '"a a a" "b b b"' +}); + +test_shorthand_value('grid-template', + ' [] "a a a" []' + + ' [] "b b b" 1fr []' + + ' / [] auto 1fr [] auto []', { + 'grid-template-rows': 'auto 1fr', + 'grid-template-columns': 'auto 1fr auto', + 'grid-template-areas': '"a a a" "b b b"' +}); +</script> +</body> +</html> |