-
-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugin-css): should handle css layer supports media (#9221)
- Loading branch information
Showing
10 changed files
with
252 additions
and
25 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
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
7 changes: 7 additions & 0 deletions
7
packages/rspack-test-tools/tests/configCases/css/at-import/a.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,7 @@ | ||
@import url("./b.css") (prefers-color-scheme: dark); | ||
|
||
@import url("./c.css") layer supports(display: grid); | ||
|
||
.a { | ||
color: blue; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/rspack-test-tools/tests/configCases/css/at-import/b.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,5 @@ | ||
@import url("https://fonts.googleapis.com/css2?family=Inter"); | ||
|
||
.b { | ||
color: red; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/configCases/css/at-import/c.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,3 @@ | ||
.c { | ||
color: pink; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/rspack-test-tools/tests/configCases/css/at-import/index.js
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,12 @@ | ||
require("./a.css"); | ||
const fs = __non_webpack_require__("fs"); | ||
const path = __non_webpack_require__("path"); | ||
|
||
it("at-import-in-the-top", async () => { | ||
const css = await fs.promises.readFile( | ||
path.resolve(__dirname, "bundle0.css"), | ||
"utf-8" | ||
); | ||
|
||
expect(css).toMatchSnapshot(); | ||
}); |
Oops, something went wrong.
decbbd7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Benchmark detail: Open
Threshold exceeded: ["10000_big_production-mode_disable-minimize + exec"]
decbbd7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Ecosystem CI detail: Open