Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit f315c70

Browse files
nt1mmoz-wptsync-bot
authored andcommitted
Bug 1972204 [wpt PR 53149] - Import invalid-media-query-list.html from WebKit layout tests, a=testonly
Automatic update from web-platform-tests Import invalid-media-query-list.html from WebKit layout tests (#53149) -- wpt-commits: 00668dccbfd2a4d51de6978f0ebed197371c7af7 wpt-pr: 53149
1 parent 62668fc commit f315c70

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="help" href="https://drafts.csswg.org/mediaqueries4/#error-handling">
5+
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
6+
<meta name="assert" content="Test if we ignore syntactically invalid media query lists with multiple media queries and missing media types.">
7+
<style>
8+
div {
9+
width: 100px;
10+
height: 20px;
11+
}
12+
13+
#valid1,
14+
#valid2,
15+
#valid3 {
16+
background-color: red;
17+
}
18+
19+
#invalid1,
20+
#invalid2 {
21+
background-color: green;
22+
}
23+
24+
@media screen and (min-width: 480px), screen and (device-width: 768px) {
25+
#valid1 {
26+
background-color: green;
27+
}
28+
}
29+
30+
@media screen {
31+
#valid2 {
32+
background-color: green;
33+
}
34+
}
35+
36+
@media {
37+
#valid3 {
38+
background-color: green;
39+
}
40+
}
41+
42+
@media screen and (min-width: 480px) screen and (device-width: 768px) {
43+
#invalid1 {
44+
background-color: red;
45+
}
46+
}
47+
48+
@media screen and (min-width: 480px) and (device-width: 768px) {
49+
#invalid2 {
50+
background-color: red;
51+
}
52+
}
53+
</style>
54+
</head>
55+
<body>
56+
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
57+
<div id="valid1"></div>
58+
<div id="valid2"></div>
59+
<div id="valid3"></div>
60+
<div id="invalid1"></div>
61+
<div id="invalid2"></div>
62+
</body>
63+
</html>

0 commit comments

Comments
 (0)