pub struct StyleResolver {
pub stylesheets: Vec<Stylesheet>,
pub ua_stylesheet: Stylesheet,
}Expand description
Style resolver that applies CSS rules to DOM nodes
Fields§
§stylesheets: Vec<Stylesheet>§ua_stylesheet: StylesheetImplementations§
Source§impl StyleResolver
impl StyleResolver
Sourcepub fn add_stylesheet(&mut self, stylesheet: Stylesheet)
pub fn add_stylesheet(&mut self, stylesheet: Stylesheet)
Add a stylesheet
Sourcepub fn resolve(
&self,
doc: &Document,
node_id: NodeId,
parent_style: Option<&ComputedStyle>,
) -> ComputedStyle
pub fn resolve( &self, doc: &Document, node_id: NodeId, parent_style: Option<&ComputedStyle>, ) -> ComputedStyle
Resolve the computed style for a node