Files
sousa-gecko/testing/web-platform/tests/css/css-conditional/at-supports-matches.html
T
EyvLil 418b817a65 Bug 2042392 [wpt PR 60171] - Added tests for CSSSupportsRule.matches, a=testonly
Automatic update from web-platform-tests
Added tests for CSSSupportsRule.matches (#60171)
--

wpt-commits: 35cfbe8b92610bbf0564999b7c3368f37fafa321
wpt-pr: 60171
2026-05-29 15:58:14 +00:00

28 lines
787 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Conditional Rules Test: CSSSupportsRule.matches</title>
<link rel="author" title="Eyvind Lillesveen" href="mailto:eyvind.lillesveen@gmail.com">
<link rel="help" href="https://drafts.csswg.org/css-conditional-3/#the-csssupportsrule-interface">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<style id=sheet1>
@supports (color: green) { div {} }
@supports (invalid: value) { div {} }
</style>
<script>
test(() => {
assert_true(sheet1.sheet.cssRules[0].matches);
}, "Matching @supports rule");
test(() => {
assert_false(sheet1.sheet.cssRules[1].matches);
}, "Non matching @supports rule");
</script>
</body>
</html>