struct
Stylesheet
pub struct Stylesheet {
/* private fields */
}Rules for every class seen so far, emitted in precedence order.
Methods
add_class
pub fn add_class(&mut self, class: &str) -> boolAdd one class; returns whether a new rule was created.
add_classes
pub fn add_classes(&mut self, classes: &str) -> boolAdd every class in a class attribute; returns whether anything new was generated.
font_faces
pub fn font_faces(&self) -> BTreeSet<String>Every @font-face rule the sheet needs (from its classes and the theme's base styles).
css_without_font_faces
pub fn css_without_font_faces(&self) -> String[Stylesheet::css] without its [Stylesheet::font_faces]: a browser downloads a font again whenever its @font-face rule is re-parsed, so a page that rewrites its stylesheet keeps those apart.