blob: 02577144323136277dd71fa86115855024dd20d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE html>
<meta charset="utf-8">
<title>Forced colors mode - color-scheme.</title>
<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#dark {
color-scheme: dark;
}
#light {
color-scheme: light;
forced-color-adjust: none;
}
</style>
<div id="dark"></div>
<div id="light"></div>
<script>
test(function(){
assert_equals(getComputedStyle(dark).colorScheme, "light dark");
assert_equals(getComputedStyle(light).colorScheme, "light");
}, "Color-scheme computes to 'light dark' in forced colors mode, unless forced-color-adjust is none.");
</script>
|