Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 4 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-ui/interactivity-inert-html-attribute-ua.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Basic User Interface Test: UA style interactivity for [inert]</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.auto { interactivity: auto; }
</style>
<div id="t1" inert></div>
<div inert>
<div id="t2"></div>
<div id="t3" class="auto"></div>
</div>
<div id="t4" inert class="auto"></div>
<script>
test(() => {
assert_equals(getComputedStyle(t1).interactivity, "inert");
}, "[inert] { interactivity: inert }");
test(() => {
assert_equals(getComputedStyle(t2).interactivity, "inert");
}, "[inert] { interactivity: inert } inherited");
test(() => {
assert_equals(getComputedStyle(t3).interactivity, "auto");
}, "Author interactivity:auto overrides inherited UA [inert] { interactivity: inert }");
test(() => {
assert_equals(getComputedStyle(t4).interactivity, "auto");
}, "Author interactivity:auto overrides UA [inert] { interactivity: inert }");
</script>