()
| 1092 | |
| 1093 | #[test] |
| 1094 | fn keep_at_rules() { |
| 1095 | let inliner = CSSInliner::options().keep_at_rules(true).build(); |
| 1096 | let html = r#" |
| 1097 | <html> |
| 1098 | <head> |
| 1099 | <style> |
| 1100 | h1 { color: blue; } |
| 1101 | @media (max-width: 600px) { h1 { font-size: 18px; } } |
| 1102 | p { margin: 10px; } |
| 1103 | </style> |
| 1104 | </head> |
| 1105 | <body> |
| 1106 | <h1>Hello</h1><p>World</p> |
| 1107 | </body> |
| 1108 | </html>"#; |
| 1109 | let inlined = inliner.inline(html).unwrap(); |
| 1110 | let expected = "<html><head><style>@media (max-width: 600px) { h1 { font-size: 18px; } } </style>\n\n</head>\n<body>\n<h1 style=\"color: blue;\">Hello</h1><p style=\"margin: 10px;\">World</p>\n\n</body></html>"; |
| 1111 | assert_eq!(inlined, expected); |
| 1112 | } |
| 1113 | |
| 1114 | #[test] |
| 1115 | fn minify_css() { |
nothing calls this directly
no test coverage detected