Module properties

Source
Expand description

CSS properties, specified values, computed values.

To implement support for a CSS property, do the following:

  • Create a type that will hold the property’s values. Please do this in the file property_defs.rs; you should cut-and-paste from the existing property definitions or read the documentation of the [make_property] macro. You should read the documentation for the property_defs module to see all that is involved in creating a type for a property.

  • Modify the call to the make_properties macro in this module to include the new property’s name.

  • Modify the rest of librsvg wherever the computed value of the property needs to be used. This is available in methods that take an argument of type ComputedValues.

Re-exports§

pub use crate::font_props::*;
pub use crate::property_defs::*;

Macros§

make_properties 🔒
Macro to generate all the machinery for properties.

Structs§

ComputedValues
Holds the computed values for the CSS properties of an element.
SpecifiedValues
Holds the specified values for the CSS properties of an element.

Enums§

ComputedValue 🔒
ParseAs
How to parse a value, whether it comes from a property or from a presentation attribute
ParsedProperty
Embodies “which property is this” plus the property’s value
PresentationAttr 🔒
Whether a property also has a presentation attribute.
PropertyId 🔒
Used to match ParsedProperty to their discriminant
SpecifiedValue
Representation of a single CSS property value.

Functions§

parse_input 🔒
parse_value
Parses a value from either a style property or from an element’s attribute.