Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-layout-api/at-supports-rule.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta name="assert" content="This test checks that a layout() function works correctly with an @supports rule." />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#test {
content: 'fail';
}
@supports (display: layout(foo)) {
#test {
content: 'pass';
}
}
</style>
<div id="test"></div>
<script>
test(function() {
const element = document.getElementById('test');
assert_equals(getComputedStyle(element).content, '"pass"');
});
</script>