Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions test/cases/at-media/a.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-size: 24px;
}
3 changes: 3 additions & 0 deletions test/cases/at-media/b.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-size: 32px;
}
3 changes: 3 additions & 0 deletions test/cases/at-media/c.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-size: 64px;
}
3 changes: 3 additions & 0 deletions test/cases/at-media/d.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-size: 128px;
}
3 changes: 3 additions & 0 deletions test/cases/at-media/e.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-size: 256px;
}
40 changes: 40 additions & 0 deletions test/cases/at-media/expected/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
body {
font-size: 24px;
}

@media screen and (orientation: landscape) {
body {
font-size: 32px;
}

}
/*@import url("./c.css") supports(display: flex);*/
/*@import url("./d.css") supports(display: flex) screen and (min-width: 400px);*/
/*@import url("./e.css") supports( display : flex ) screen and ( min-width : 400px ) ;*/
/*@import url("./f.css") supports(not (display: flex));*/
/*@import url("./g.css") SUPPORTS(NOT (DISPLAY: FLEX));*/

div {
color: blue;
}

@media {
div {
color: red;
}
}

@media screen and (min-width: 900px) {
article {
padding: 1rem 3rem;
}
}

@supports (display: flex) {
@media screen and (min-width: 900px) {
article {
display: flex;
}
}
}

3 changes: 3 additions & 0 deletions test/cases/at-media/f.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-size: 512px;
}
3 changes: 3 additions & 0 deletions test/cases/at-media/g.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-size: 1024px;
}
1 change: 1 addition & 0 deletions test/cases/at-media/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./style.css";
31 changes: 31 additions & 0 deletions test/cases/at-media/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@import url("./a.css");
@import url("./b.css") screen and (orientation: landscape);
/*@import url("./c.css") supports(display: flex);*/
/*@import url("./d.css") supports(display: flex) screen and (min-width: 400px);*/
/*@import url("./e.css") supports( display : flex ) screen and ( min-width : 400px ) ;*/
/*@import url("./f.css") supports(not (display: flex));*/
/*@import url("./g.css") SUPPORTS(NOT (DISPLAY: FLEX));*/

div {
color: blue;
}

@media {
div {
color: red;
}
}

@media screen and (min-width: 900px) {
article {
padding: 1rem 3rem;
}
}

@supports (display: flex) {
@media screen and (min-width: 900px) {
article {
display: flex;
}
}
}
25 changes: 25 additions & 0 deletions test/cases/at-media/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Self from "../../../src";

module.exports = {
entry: "./index.js",
module: {
rules: [
{
test: /\.css$/,
use: [
{
loader: Self.loader,
},
{
loader: "css-loader",
},
],
},
],
},
plugins: [
new Self({
filename: "[name].css",
}),
],
};