summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/mediaqueries/negation-001.html
blob: 9badf8ee17fe15766f9aebae74d2b10d08b4d5e2 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!doctype html>
<html>
	<head>
		<title>Test: support for negated conditions in Media Queries</title>
		<link rel="author" title="Romain Menke" href="https://github.com/romainmenke">
		<link rel="help" href="https://www.w3.org/TR/mediaqueries-4/#media-conditions">
		<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
		<meta name="assert" content="Test passes if negated conditions are correctly evaluated.">
		<style>
			div {
				background-color: red;
				height: 20px;
				width: 100px;
			}
			@media not print {
				.test1 { background: green; }
			}
			@media not (monochrome) {
				.test2 { background: green; }
			}
			@media (not (monochrome)) {
				.test3 { background: green; }
			}
			@media not (not (color)) {
				.test4 { background: green; }
			}
			@media not ((unknown) or (monochrome)) {
				.test5 { background: green; }
			}
	</style>
	</head>
	<body>
		<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
		<div class="test1"></div>
		<div class="test2"></div>
		<div class="test3"></div>
		<div class="test4"></div>
		<div class="test5"></div>
	</body>
</html>