Skip to content

Commit afa8b08

Browse files
committed
support media queries
1 parent cfc9982 commit afa8b08

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ function annotateUrls(tree) {
119119
case "ruleset": return iterateChildren();
120120
case "block": return iterateChildren();
121121
case "atruleb": return iterateChildren();
122+
case "atruler": return iterateChildren();
123+
case "atrulers": return iterateChildren();
122124
case "declaration": return iterateChildren();
123125
case "value": return iterateChildren();
124126
case "uri":

test/urlTest.js

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ describe("url", function() {
6666
["\".highlight { filter: url(#highlight); }\""]);
6767
test("font face", "@font-face { src: url(regular.woff) format('woff'), url(~truetype/regular.ttf) format('truetype') }",
6868
["\"@font-face { src: url(\"+require(\"./regular.woff\")+\") format('woff'), url(\"+require(\"truetype/regular.ttf\")+\") format('truetype') }\""]);
69+
test("media query", "@media (min-width: 500px) { body { background: url(image.png); } }",
70+
["\"@media (min-width: 500px) { body { background: url(\"+require(\"./image.png\")+\"); } }\""]);
6971
testMinimize("minimized simple", ".class { a: b c d; }",
7072
["\".class{a:b c d}\""]);
7173
});

0 commit comments

Comments
 (0)