grass/tests/supports.rs
2021-07-24 01:18:36 -04:00

53 lines
1.0 KiB
Rust

#[macro_use]
mod macros;
test!(
style_following,
"@supports (a: b) {
a {
color: red;
}
}
a {
color: green;
}",
"@supports (a: b) {\n a {\n color: red;\n }\n}\na {\n color: green;\n}\n"
);
test!(
newline_between_styles_inside,
"@supports (-ms-ime-align: auto) {
a {
color: red;
}
b {
color: green;
}
}",
"@supports (-ms-ime-align: auto) {\n a {\n color: red;\n }\n\n b {\n color: green;\n }\n}\n"
);
test!(
no_newline_after_media,
"@supports (position: sticky) {
a {
color: red;
}
@media (min-width: 576px) {
a {
color: red;
}
a {
color: red;
}
}
a {
color: red;
}
}",
"@supports (position: sticky) {\n a {\n color: red;\n }\n\n @media (min-width: 576px) {\n a {\n color: red;\n }\n\n a {\n color: red;\n }\n }\n a {\n color: red;\n }\n}\n"
);