Module rsvg::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; 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.


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


Macro to generate all the machinery for properties.


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


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


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