Returns an iterator of metadata-based pseudo-class names that match the given metadata. This only includes pseudos that can be determined from metadata alone, excluding positional pseudos like `:first-child` or `:nth-of-type`.
(meta: &CssMetadata)
| 597 | /// This only includes pseudos that can be determined from metadata alone, |
| 598 | /// excluding positional pseudos like `:first-child` or `:nth-of-type`. |
| 599 | pub fn matching_metadata_pseudos(meta: &CssMetadata) -> impl Iterator<Item = &'static str> { |
| 600 | [ |
| 601 | (meta.has_important(), "important"), |
| 602 | (meta.has_custom_properties(), "custom"), |
| 603 | (meta.has_computed(), "computed"), |
| 604 | (meta.has_shorthands(), "shorthand"), |
| 605 | (meta.has_longhands(), "longhand"), |
| 606 | (meta.has_unknown(), "unknown"), |
| 607 | (meta.has_at_rules(), "at-rule"), |
| 608 | (meta.has_rules(), "rule"), |
| 609 | (meta.has_functions(), "function"), |
| 610 | (meta.is_empty_container(), "empty"), |
| 611 | (meta.has_vendor_prefixes(), "prefixed"), |
| 612 | ] |
| 613 | .into_iter() |
| 614 | .filter_map(|(matches, name)| matches.then_some(name)) |
| 615 | } |
| 616 | } |
| 617 | |
| 618 | /// Functional pseudo-classes (`:not()`, `:nth-child()`, etc.). |
nothing calls this directly
no test coverage detected