Enum style::selector_parser::PseudoElementCascadeType
[−]
[src]
pub enum PseudoElementCascadeType { Eager, Lazy, Precomputed, }
This enumeration determines if a pseudo-element is eagerly cascaded or not.
If you're implementing a public selector for Servo
that the end-user might
customize, then you probably need to make it eager.
Variants
Eager
Eagerly cascaded pseudo-elements are "normal" pseudo-elements (i.e.
::before
and ::after
). They inherit styles normally as another
selector would do, and they're computed as part of the cascade.
Lazy
Lazy pseudo-elements are affected by selector matching, but they're only computed when needed, and not before. They're useful for general pseudo-elements that are not very common.
Note that in Servo lazy pseudo-elements are restricted to a subset of selectors, so you can't use it for public pseudo-elements. This is not the case with Gecko though.
Precomputed
Precomputed pseudo-elements skip the cascade process entirely, mostly as
an optimisation since they are private pseudo-elements (like
::-servo-details-content
).
This pseudo-elements are resolved on the fly using only global rules
(rules of the form *|*
), and applying them to the parent style.
Trait Implementations
impl Clone for PseudoElementCascadeType
[src]
fn clone(&self) -> PseudoElementCascadeType
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for PseudoElementCascadeType
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more