Skip to content

Commit 7b62abd

Browse files
lilleschromium-wpt-export-bot
authored andcommitted
Exclude interactivity from all shorthand
This is not covered by the spec. Filed a github issue: w3c/csswg-drafts#12049 Bug: 408241037 Change-Id: I25038defc17d848225eba6629a69c53889ea2642 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6432134 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: Rune Lillesveen <[email protected]> Cr-Commit-Position: refs/heads/main@{#1442718}
1 parent 7622e05 commit 7b62abd

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<title>CSS UI Test: The 'all' shorthand does not include 'interactivity'</title>
3+
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#inertness">
4+
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/12049">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<style>
8+
#inert {
9+
interactivity: inert;
10+
}
11+
#child {
12+
all: initial;
13+
}
14+
</style>
15+
<div id="inert">
16+
<span id="child"></span>
17+
</div>
18+
<script>
19+
test(() => {
20+
assert_equals(getComputedStyle(child).interactivity, "inert");
21+
}, "The 'all' shorthand should not set 'interactivity'");
22+
</script>

css/cssom/cssstyledeclaration-csstext-all-shorthand.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
cssText += longhand + ": inherit; ";
3434
}
3535
style.cssText = cssText;
36-
assert_equals(style.cssText, "all: inherit; direction: inherit; unicode-bidi: inherit;");
36+
if (CSS.supports("interactivity:inert")) {
37+
assert_equals(style.cssText, "all: inherit; direction: inherit; interactivity: inherit; unicode-bidi: inherit;");
38+
} else {
39+
assert_equals(style.cssText, "all: inherit; direction: inherit; unicode-bidi: inherit;");
40+
}
3741
}, "'all' shorthand with all longhands");
3842

3943
test(function() {

0 commit comments

Comments
 (0)