-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix open issues : postcss-image-set-function (#58)
* fix postcss-image-set-function with image lists * fix no url case
- Loading branch information
1 parent
046e252
commit 551f846
Showing
6 changed files
with
138 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,14 @@ | |
} | ||
} | ||
|
||
.list-1 { | ||
background-image: linear-gradient(#4444, #8888), image-set(url(img.png) 1x, url([email protected]) 2x); | ||
} | ||
|
||
.list-2 { | ||
background-image: image-set(url(img-a.png) 1x, url([email protected]) 2x), image-set(url(img-b.png) 1x, url([email protected]) 2x); | ||
} | ||
|
||
.test-valid-data-url { | ||
background-image: image-set(url(data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==) 1x, url(img/test-2x.png) 2x); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,13 +156,13 @@ | |
|
||
.test-no-url { | ||
order: 1; | ||
background-image: "img/test.png"; | ||
background-image: url("img/test.png"); | ||
background-image: image-set( | ||
"img/test.png" 1x, | ||
"img/test-2x.png" 2x | ||
); | ||
order: 2; | ||
background-image: "img/test.png"; | ||
background-image: url("img/test.png"); | ||
background-image: image-set( | ||
"img/test.png" 1x, | ||
"img/test-2x.png" 2x, | ||
|
@@ -174,21 +174,21 @@ | |
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.test-no-url { | ||
background-image: "img/test-2x.png"; | ||
background-image: url("img/test-2x.png"); | ||
} | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 6.25), (min-resolution: 600dpi) { | ||
|
||
.test-no-url { | ||
background-image: "my-img-print.png"; | ||
background-image: url("my-img-print.png"); | ||
} | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.test-no-url { | ||
background-image: "img/test-2x.png"; | ||
background-image: url("img/test-2x.png"); | ||
} | ||
} | ||
|
||
|
@@ -259,6 +259,30 @@ | |
} | ||
} | ||
|
||
.list-1 { | ||
background-image: linear-gradient(#4444, #8888), url(img.png); | ||
background-image: linear-gradient(#4444, #8888), image-set(url(img.png) 1x, url([email protected]) 2x); | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.list-1 { | ||
background-image: linear-gradient(#4444, #8888), url([email protected]); | ||
} | ||
} | ||
|
||
.list-2 { | ||
background-image: url(img-a.png), url(img-b.png); | ||
background-image: image-set(url(img-a.png) 1x, url([email protected]) 2x), image-set(url(img-b.png) 1x, url([email protected]) 2x); | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.list-2 { | ||
background-image: url([email protected]), url([email protected]); | ||
} | ||
} | ||
|
||
.test-valid-data-url { | ||
background-image: url(data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==); | ||
background-image: image-set(url(data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==) 1x, url(img/test-2x.png) 2x); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,30 +118,30 @@ | |
|
||
.test-no-url { | ||
order: 1; | ||
background-image: "img/test.png"; | ||
background-image: url("img/test.png"); | ||
order: 2; | ||
background-image: "img/test.png"; | ||
background-image: url("img/test.png"); | ||
order: 3; | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.test-no-url { | ||
background-image: "img/test-2x.png"; | ||
background-image: url("img/test-2x.png"); | ||
} | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 6.25), (min-resolution: 600dpi) { | ||
|
||
.test-no-url { | ||
background-image: "my-img-print.png"; | ||
background-image: url("my-img-print.png"); | ||
} | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.test-no-url { | ||
background-image: "img/test-2x.png"; | ||
background-image: url("img/test-2x.png"); | ||
} | ||
} | ||
|
||
|
@@ -197,6 +197,28 @@ | |
} | ||
} | ||
|
||
.list-1 { | ||
background-image: linear-gradient(#4444, #8888), url(img.png); | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.list-1 { | ||
background-image: linear-gradient(#4444, #8888), url([email protected]); | ||
} | ||
} | ||
|
||
.list-2 { | ||
background-image: url(img-a.png), url(img-b.png); | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { | ||
|
||
.list-2 { | ||
background-image: url([email protected]), url([email protected]); | ||
} | ||
} | ||
|
||
.test-valid-data-url { | ||
background-image: url(data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==); | ||
} | ||
|