Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@container] Change order of container shorthand #33565

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions css/css-contain/container-queries/container-computed.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
test_computed_value('container', 'initial', 'none');
test_computed_value('container', 'inherit', 'none');
test_computed_value('container', 'unset', 'none');
test_computed_value('container', 'inline-size');
test_computed_value('container', 'size');
test_computed_value('container', 'none / inline-size');
test_computed_value('container', 'none / size');
test_computed_value('container', 'inline-size / inline-size');
test_computed_value('container', 'size / block-size');
test_computed_value('container', 'size style / name', 'style size / name');
test_computed_value('container', 'inline-size style/ name', 'style inline-size / name');
test_computed_value('container', 'inline-size / foo');
test_computed_value('container', 'inline-size /foo', 'inline-size / foo');
test_computed_value('container', 'inline-size/ foo', 'inline-size / foo');
test_computed_value('container', 'inline-size/foo', 'inline-size / foo');
test_computed_value('container', 'size / FoO', 'size / FoO');
test_computed_value('container', 'size / foo bar', 'size / foo bar');
test_computed_value('container', 'block-size / size');
test_computed_value('container', 'name / size style', 'name / style size');
test_computed_value('container', 'name /inline-size style', 'name / style inline-size');
test_computed_value('container', 'foo / inline-size');
test_computed_value('container', 'foo /inline-size', 'foo / inline-size');
test_computed_value('container', 'foo/ inline-size', 'foo / inline-size');
test_computed_value('container', 'foo/inline-size', 'foo / inline-size');
test_computed_value('container', 'FoO / size');
test_computed_value('container', 'foo bar / size', 'foo bar / size');
</script>
43 changes: 24 additions & 19 deletions css/css-contain/container-queries/container-parsing.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,40 @@
test_valid_value('container', 'none');
test_valid_value('container', 'none / none', 'none');
test_valid_value('container', 'inline-size');
test_valid_value('container', 'inline-size / none', 'inline-size');
test_valid_value('container', 'none / inline-size', 'none / inline-size');
test_valid_value('container', 'size');
test_valid_value('container', 'size / block-size');
test_valid_value('container', 'block-size / size');
test_valid_value('container', 'inline-size / inline-size');
test_valid_value('container', 'size / size');
test_valid_value('container', 'size style / none', 'style size');
test_valid_value('container', 'size / foo');
test_valid_value('container', 'size / foo bar');
test_valid_value('container', 'none / size style', 'none / style size');
test_valid_value('container', 'foo');
test_valid_value('container', 'foo / none', 'foo');
test_valid_value('container', 'foo bar / size');
test_valid_value('container', 'foo bar / none', 'foo bar');
test_valid_value('container', 'FOO / size');
test_valid_value('container', 'FOO/size', 'FOO / size');
test_valid_value('container', ' FOO /size', 'FOO / size');

test_invalid_value('container', 'none none');
test_invalid_value('container', 'none inline-size');
test_invalid_value('container', 'inline-size none');
test_invalid_value('container', 'inline-size inline-size');
test_invalid_value('container', 'inline-size block-size unknown');
test_invalid_value('container', 'inline-size block-size');
test_invalid_value('container', 'size block-size');
test_invalid_value('container', 'none / inline-size none');
test_invalid_value('container', 'none / inline-size inline-size');
test_invalid_value('container', 'none / inline-size block-size unknown');
test_invalid_value('container', 'none / inline-size block-size');
test_invalid_value('container', 'none / size block-size');
test_invalid_value('container', 'none, none');
test_invalid_value('container', 'foo');
test_invalid_value('container', 'foo, bar');
test_invalid_value('container', 'none / foo');
test_invalid_value('container', 'none / foo, bar');
test_invalid_value('container', '#fff');
test_invalid_value('container', '1px');
test_invalid_value('container', 'default');
test_invalid_value('container', 'inline-size / 10px');
test_invalid_value('container', 'inline-size / #fefefe');
test_invalid_value('container', 'inline-size / calc(3px)');
test_invalid_value('container', '10px / inline-size');
test_invalid_value('container', '#fefefe / inline-size');
test_invalid_value('container', 'calc(3px) / inline-size');
test_invalid_value('container', 'size 1 / name');
test_invalid_value('container', 'block-size');
test_invalid_value('container', 'block-size / name');
test_invalid_value('container', 'block-size / NAME', 'block-size / NAME');
test_invalid_value('container', 'block-size/NAME','block-size / NAME');
test_invalid_value('container', 'none / block-size');
test_invalid_value('container', 'name / block-size');
test_invalid_value('container', ' NAME / block-size', 'NAME / block-size');
test_invalid_value('container', 'NAME/block-size','NAME / block-size');
test_invalid_value('container', 'block-size / block-size');
</script>
10 changes: 5 additions & 5 deletions css/css-contain/container-queries/container-selection.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
.inline { container-type: inline-size; }
.size { container-type: size; }

.a-inline { container: inline-size / a; }
.a-size { container: size / a; }
.a-inline { container: a / inline-size; }
.a-size { container: a / size; }

.b-size { container: inline-size / b; }
.b-size { container: size / b; }
.b-size { container: inline- b / size; }
.b-size { container: b / size; }

.ab-size { container: size / a b; }
.ab-size { container: a b / size; }

.a { container-name: a; contain: strict; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container">
<link rel="help" href="https://crbug.com/1289850">
<p>Pass if there is no crash.</p>
<canvas id="canv" style="display:block;position:absolute;container:inline-size"></canvas>
<canvas id="canv" style="display:block;position:absolute;container-type:inline-size"></canvas>
<script>
canv.offsetTop;
canv.appendChild(document.createElement("span"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1289718">
<div style="container:inline-size;">
<div style="container-type:inline-size;">
<span style="columns:2;"></span>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1289718">
<div style="container:inline-size;">
<div style="container-type:inline-size;">
<video style="columns:2;"></video>
</div>