pub enum StyleDecl {
Set(StyleKey, PropertyValue),
SetTransform(TransformProperty, Box<[(TransformKind, f32, Option<NodeId>)]>),
Transform(TransformKind, f32, Option<NodeId>),
Animated(AnimationProp, NodeId),
Default(StyleKey, PropertyValue),
CurrentColor(StyleKey),
}Expand description
One declaration of a StylePatch.
Variants§
Set(StyleKey, PropertyValue)
A property.
SetTransform(TransformProperty, Box<[(TransformKind, f32, Option<NodeId>)]>)
Sets a transform property to its steps, each driven by an animated value when it has one (the amount is then the identity until it is bound): the steps of other properties stay.
Transform(TransformKind, f32, Option<NodeId>)
Appends a transform step after every property’s, driven by an
animated value when given (a Rust component’s bind_transform).
Animated(AnimationProp, NodeId)
A property driven by a native animation node.
Default(StyleKey, PropertyValue)
A value the property takes unless a class or the style itself sets
it (display: "flex"’s row, as CSS’s): applied before the classes
(StylePatch::apply_defaults), never by StyleDecl::apply.
CurrentColor(StyleKey)
The color property is the node’s text color unless a class or the
style sets it: CSS’s currentColor, the color of a border or an
outline whose width the style sets. Applied before the classes, as
StyleDecl::Default.