-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support for
supports()
and layer()
in @import
at-ru…
…le (#843)
- Loading branch information
1 parent
9d102a3
commit e751080
Showing
18 changed files
with
323 additions
and
24 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@layer framework { | ||
@layer base {.bottom { | ||
background: blue; | ||
} | ||
} | ||
} | ||
@layer framework { | ||
@layer base { | ||
.middle { | ||
background: green; | ||
} | ||
} | ||
|
||
} | ||
@layer { | ||
.color { | ||
color: red; | ||
} | ||
|
||
} | ||
@supports (display: flex) { | ||
@media (prefers-color-scheme: dark) { | ||
@layer default { | ||
@supports (display: grid) {@media screen and (min-width: 900px) {@layer base {.foo { | ||
color: red; | ||
} | ||
}}} | ||
} | ||
} | ||
} | ||
@supports (display: flex) { | ||
@media (prefers-color-scheme: dark) { | ||
@layer default { | ||
/* prettier-ignore */ | ||
|
||
.bar { | ||
color: blue; | ||
} | ||
|
||
} | ||
} | ||
} | ||
/* prettier-ignore */ | ||
|
||
.top { | ||
background: red; | ||
} | ||
|
6 changes: 6 additions & 0 deletions
6
test/cases/at-import-layer/import-with-layer-and-supports-and-media.css
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* prettier-ignore */ | ||
@import url("./zzz.css") layer(base) supports(display: grid) screen and (min-width: 900px); | ||
|
||
.bar { | ||
color: blue; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@import url("./test.css") layer(base); | ||
|
||
@layer base { | ||
.middle { | ||
background: green; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
import "./style.css"; |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@import url("./import-with-layer.css") layer(framework); | ||
@import url("./unnamed-layer.css") layer; | ||
/* prettier-ignore */ | ||
@import url("./import-with-layer-and-supports-and-media.css") layer(default) supports(display: flex) (prefers-color-scheme: dark); | ||
|
||
.top { | ||
background: red; | ||
} |
Oops, something went wrong.