Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-conditional/container-queries/idlharness.html - WPT Dashboard Interop Dashboard
<!doctype html>
<title>CSS Container Queries: CSSContainer Rule IDL tests</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<!-- used to provide objects -->
<style>
@container cont (width = 100px) {
@container (inline-size > 200em) {
#id { color: lime }
}
#id { color: green }
}
</style>
<script>
idl_test(
['css-conditional-5'],
['css-conditional', 'cssom', 'dom'],
idl_array => {
idl_array.add_objects({
CSSContainerRule: ['sheet.cssRules[0]',
'sheet.cssRules[0].cssRules[0]'],
});
self.sheet = document.styleSheets[0];
}
);
</script>