Module stylesheets

Source
Expand description

Style sheets and their CSS rules.

Re-exportsยง

pub use self::container_rule::ContainerRule;
pub use self::counter_style_rule::CounterStyleRule;
pub use self::font_face_rule::FontFaceRule;
pub use self::font_feature_values_rule::FontFeatureValuesRule;
pub use self::font_palette_values_rule::FontPaletteValuesRule;
pub use self::import_rule::ImportRule;
pub use self::keyframes_rule::KeyframesRule;
pub use self::layer_rule::LayerBlockRule;
pub use self::layer_rule::LayerStatementRule;
pub use self::origin::Origin;
pub use self::origin::OriginSet;
pub use self::origin::OriginSetIterator;
pub use self::origin::PerOrigin;
pub use self::origin::PerOriginIter;
pub use self::position_try_rule::PositionTryRule;
pub use self::property_rule::PropertyRule;
pub use self::scope_rule::ScopeRule;
pub use self::supports_rule::SupportsRule;

Modulesยง

container_rule
A @container rule.
counter_style_rule ๐Ÿ”’
document_rule ๐Ÿ”’
@document rules initially in CSS Conditional Rules Module Level 3, @document has been postponed to the level 4. We implement the prefixed @-moz-document.
font_face_rule ๐Ÿ”’
font_feature_values_rule
The @font-feature-values at-rule.
font_palette_values_rule
The @font-palette-values at-rule.
import_rule
The @import at-rule.
keyframes_rule
Keyframes: https://drafts.csswg.org/css-animations/#keyframes
layer_rule
A @layer rule.
loader ๐Ÿ”’
The stylesheet loader is the abstraction used to trigger network requests for @import rules.
margin_rule ๐Ÿ”’
A @margin rule.
media_rule ๐Ÿ”’
An @media rule.
namespace_rule ๐Ÿ”’
The @namespace at-rule.
nested_declarations_rule ๐Ÿ”’
A nested declarations rule. https://drafts.csswg.org/css-nesting-1/#nested-declarations-rule
origin
CSS cascade origins.
page_rule ๐Ÿ”’
A @page rule.
position_try_rule
A @position-try rule for Anchor Positioning.
property_rule ๐Ÿ”’
rule_list ๐Ÿ”’
A list of CSS rules.
rule_parser ๐Ÿ”’
Parsing of the stylesheet contents.
rules_iterator ๐Ÿ”’
An iterator over a list of rules.
scope_rule
A @scope rule.
starting_style_rule ๐Ÿ”’
before-change style: the @starting-style rules. https://drafts.csswg.org/css-transitions-2/#defining-before-change-style
style_rule ๐Ÿ”’
A style rule.
stylesheet ๐Ÿ”’
supports_rule
@supports rules

Structsยง

AllRules
A filter that processes all the rules in a rule list.
CssRuleTypes
Set of rule types.
CssRules
A list of CSS rules.
DocumentRule
A @-moz-document rule
DocumentStyleSheet
A simple wrapper over an Arc<Stylesheet>, with pointer comparison, and suitable for its use in a StylesheetSet.
EffectiveRules
A struct that represents the condition that a rule applies to the document.
InsertRuleContext
The information we need particularly to do CSSOM insertRule stuff.
MarginRule
A @margin rule.
MediaRule
An @media rule.
NamespaceRule
A @namespace rule.
Namespaces
A set of namespaces applying to a given stylesheet.
NestedDeclarationsRule
A nested declarations rule.
PagePseudoClassFlags
Bit-flags for pseudo-class. This should only be used for querying if a page-rule applies.
PageRule
A @page rule.
PageSelector
Type of a single [@page][page selector]
PageSelectors
A list of [@page][page selectors]
RulesIterator
An iterator over a list of rules.
SanitizationData
A struct to hold the data relevant to style sheet sanitization.
StartingStyleRule
A @starting-style rule.
StyleRule
A style rule, with selectors and declarations.
Stylesheet
The structure servo uses to represent a stylesheet.
StylesheetContents
The contents of a given stylesheet. This effectively maps to a StyleSheetInner in Gecko.
TopLevelRuleParser
The parser for the top-level rules in a stylesheet.
UrlExtraData
Extra data that the backend may need to resolve url values.
UserAgentStylesheets
This structure holds the user-agent and user stylesheets.

Enumsยง

AllowImportRules
Whether @import rules are allowed.
CorsMode
The CORS mode used for a CSS load.
CssRule
A CSS rule.
CssRuleType
https://drafts.csswg.org/cssom-1/#dom-cssrule-type
MarginRuleType
[@margin][margin] rule names.
RulesMutateError
SanitizationKind
The kind of sanitization to use when parsing a stylesheet.
State
The current state of the parser.

Traitsยง

CssRulesHelpers
A trait to implement helpers for Arc<Locked<CssRules>>.
NestedRuleIterationCondition
RulesIterator.
StylesheetInDocument
A trait to represent a given stylesheet in a document.
StylesheetLoader
The stylesheet loader is the abstraction used to trigger network requests for @import rules.

Functionsยง

style_or_page_rule_to_css ๐Ÿ”’
Serialize a page or style rule, starting with the opening brace.

Type Aliasesยง

EffectiveRulesIterator
An iterator over all the effective rules of a stylesheet.