File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -5734,6 +5734,8 @@ mod tests {
57345734 minify_test("a:is(:first-child) { color: yellow }", "a:first-child{color:#ff0}");
57355735 minify_test("a:is(:has(.foo)) { color: yellow }", "a:has(.foo){color:#ff0}");
57365736 minify_test("a:is(:is(.foo)) { color: yellow }", "a.foo{color:#ff0}");
5737+ minify_test(":host(:hover) {color: red}", ":host(:hover){color:red}");
5738+ minify_test("::slotted(:hover) {color: red}", "::slotted(:hover){color:red}");
57375739 }
57385740
57395741 #[test]
Original file line number Diff line number Diff line change @@ -1324,6 +1324,20 @@ where
13241324 dest. write_char ( '#' ) ?;
13251325 dest. write_ident ( & id. 0 )
13261326 }
1327+ Component :: Host ( selector) => {
1328+ dest. write_str ( ":host" ) ?;
1329+ if let Some ( ref selector) = * selector {
1330+ dest. write_char ( '(' ) ?;
1331+ selector. to_css ( dest) ?;
1332+ dest. write_char ( ')' ) ?;
1333+ }
1334+ Ok ( ( ) )
1335+ }
1336+ Component :: Slotted ( ref selector) => {
1337+ dest. write_str ( "::slotted(" ) ?;
1338+ selector. to_css ( dest) ?;
1339+ dest. write_char ( ')' )
1340+ }
13271341 _ => {
13281342 cssparser:: ToCss :: to_css ( component, dest) ?;
13291343 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments