MCPcopy Create free account
hub / github.com/csskit/csskit / test_stylesheet_metadata_nested_media

Function test_stylesheet_metadata_nested_media

crates/css_ast/src/metadata.rs:560–571  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

558
559 #[test]
560 fn test_stylesheet_metadata_nested_media() {
561 let css = "@media screen { body { color: red; } }";
562 let bump = bumpalo::Bump::new();
563 let lexer = Lexer::new(&CssAtomSet::ATOMS, css);
564 let mut parser = Parser::new(&bump, css, lexer);
565 let stylesheet = parser.parse::<StyleSheet>().unwrap();
566
567 let metadata = stylesheet.metadata();
568
569 assert!(metadata.property_groups.contains(PropertyGroup::Color));
570 assert!(metadata.used_at_rules.contains(AtRuleId::Media));
571 }
572
573 #[test]
574 fn test_vendor_prefixes_try_from() {

Callers

nothing calls this directly

Calls 1

metadataMethod · 0.45

Tested by

no test coverage detected