pub trait Property {
    // Required methods
    fn inherits_automatically() -> bool;
    fn compute(&self, _: &ComputedValues) -> Self;
}
Expand description

Trait which all CSS property types should implement.

Required Methods§

source

fn inherits_automatically() -> bool

Whether the property’s computed value inherits from parent to child elements.

For each property, the CSS or SVG specs say whether the property inherits automatically. When a property is not specified in an element, the return value of this method determines whether the property’s value is copied from the parent element (true), or whether it resets to the initial/default value (false).

source

fn compute(&self, _: &ComputedValues) -> Self

Derive the CSS computed value from the parent element’s ComputedValues and the self value.

The CSS or SVG specs say how to derive this for each property.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Property for Font

source§

impl Property for FontSize

source§

impl Property for FontWeight

source§

impl Property for GlyphOrientationVertical

source§

impl Property for LetterSpacing

source§

impl Property for LineHeight

source§

impl Property for ClipRule

source§

impl Property for ColorInterpolationFilters

source§

impl Property for Direction

source§

impl Property for Display

source§

impl Property for EnableBackground

source§

impl Property for FillRule

source§

impl Property for Filter

source§

impl Property for FontStretch

source§

impl Property for FontStyle

source§

impl Property for FontVariant

source§

impl Property for ImageRendering

source§

impl Property for Isolation

source§

impl Property for MaskType

source§

impl Property for MixBlendMode

source§

impl Property for Overflow

source§

impl Property for ShapeRendering

source§

impl Property for StrokeLinecap

source§

impl Property for StrokeLinejoin

source§

impl Property for TextAnchor

source§

impl Property for TextOrientation

source§

impl Property for TextRendering

source§

impl Property for UnicodeBidi

source§

impl Property for VectorEffect

source§

impl Property for Visibility

source§

impl Property for WritingMode

source§

impl Property for XmlSpace

source§

impl Property for TransformProperty

source§

impl Property for FontFamily

source§

impl Property for BaselineShift

source§

impl Property for CX

source§

impl Property for CY

source§

impl Property for ClipPath

source§

impl Property for Color

source§

impl Property for Fill

source§

impl Property for FillOpacity

source§

impl Property for FloodColor

source§

impl Property for FloodOpacity

source§

impl Property for Height

source§

impl Property for LightingColor

source§

impl Property for Marker

source§

impl Property for MarkerEnd

source§

impl Property for MarkerMid

source§

impl Property for MarkerStart

source§

impl Property for Mask

source§

impl Property for Opacity

source§

impl Property for PaintOrder

source§

impl Property for R

source§

impl Property for RX

source§

impl Property for RY

source§

impl Property for StopColor

source§

impl Property for StopOpacity

source§

impl Property for Stroke

source§

impl Property for StrokeDasharray

source§

impl Property for StrokeDashoffset

source§

impl Property for StrokeMiterlimit

source§

impl Property for StrokeOpacity

source§

impl Property for StrokeWidth

source§

impl Property for TextDecoration

source§

impl Property for Transform

source§

impl Property for Width

source§

impl Property for X

source§

impl Property for XmlLang

source§

impl Property for Y