test(css/minifier): Add tests for layer (#6221)

This commit is contained in:
Alexander Akait 2022-10-21 04:36:00 +03:00 committed by GitHub
parent 1186c52ea4
commit 055bdcd997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,68 @@
@layer default, theme, components;
@layer foo.bar;
@layer foo.bar, baz;
@layer framework {
@layer layout {
@layer base {
}
}
}
@layer a{
@layer b {
div {color: yellow; margin: 0px;}
}
}
@layer framework {
@layer base {
p { margin-block: 0.75em; }
}
@layer theme {
p { color: #222; }
}
}
@layer framework.theme {
/* These styles will be added to the theme layer inside the framework layer */
blockquote { color: rebeccapurple; }
}
@layer {
@layer foo {
color: red;
}
@layer foo {
color: red;
}
}
@layer {
@layer foo { color: red; }
}
@layer {
@layer foo { color: red; }
}
@layer framework {
h1, h2 { color: maroon; background: white;}
@media (prefers-color-scheme: dark) {
h1, h2 { color: red; background: black; }
}
}
@layer foo {
.foo {
color: red;
}
}
@layer foo {
.foo {
background: #fff;
}
.baz {
color: #fff;
}
}

View File

@ -0,0 +1 @@
@layer default,theme,components;@layer foo.bar;@layer foo.bar,baz;@layer framework{}@layer a{@layer b{div{color:yellow;margin:0}}}@layer framework{@layer base{p{margin-block:.75em}}@layer theme{p{color:#222}}}@layer framework.theme{blockquote{color:rebeccapurple}}@layer{@layer foo{color: red;}@layer foo{color: red;}}@layer{@layer foo{color: red;}}@layer{@layer foo{color: red;}}@layer framework{h1,h2{color:maroon;background:white}@media(prefers-color-scheme:dark){h1,h2{color:red;background:black}}}@layer foo{.foo{color:red}}@layer foo{.foo{background:#fff}.baz{color:#fff}}