Skip to main content

Module css_resolver

Module css_resolver 

Source
Expand description

A CSS resolver that handles selector matching and value resolution.

Structs§

CssResolver
MediaEnvironment
Values used to evaluate media queries for the current page.
ResolvedDeclaration
A single CSS declaration after selector resolution and value processing.
RuleSet
Indexed collection of resolved CSS declarations partitioned by selector subject.
SelectorGroup
Declarations whose selectors are structurally identical. Matching selector once is sufficient to cascade every declaration in decls; decls holds indices into RuleSet::declarations.
StylesheetResolution
Result of resolving a stylesheet: cascaded declarations plus keyframes.

Enums§

PseudoElement
The originating pseudo-element of a declaration, if any.
StyleOrigin
Origin of a declaration in the CSS cascade.

Functions§

append_resolved_styles
Appends resolved declarations while preserving source order across stylesheets.
evaluate_media_query
Evaluates a parsed media query (as produced by crate::engine::css::parser::Parser::parse_media_query) against the current page environment, mirroring how @media rules are filtered.
filter_media
Keeps only declarations whose enclosing media queries currently match.
resolve_inline_style
Resolves a style attribute’s declarations into (name, value, important) triples, applying var() and !important handling like a rule block.
resolve_inline_value

Type Aliases§

KeyframesRegistry
Registry of @keyframes rules keyed by animation name.
ResolvedStyles