Expand description
Typed values: CSS Values and Units Level 4’s numbers, dimensions and math functions, CSS Color Level 4’s colors, and the value definition syntax every property’s grammar is written in.
Structs§
- Absolute
- A colour with numbers for channels,
Nonewhere one is missing. - Channels
- A color with channels: everything but the keywords that stand for one.
- Custom
Properties - An element’s custom properties, as declared.
- Guaranteed
Invalid - The guaranteed-invalid value turned up where a value was needed: a
var()with nothing to stand for and no fallback. - Invalid
Value - The value didn’t match the property’s grammar, or the property isn’t one the specs define.
- Math
- A math function’s value: its simplified calculation tree.
- Property
Data - One property, as its spec defines it.
- Relative
- A relative color: an origin color and channels that may name the origin’s, kept as written until there’s a value to work them out from.
- Resolved
- Custom properties with every
var()in them substituted. A name that maps toNoneholds the guaranteed-invalid value.
Enums§
- Channel
- One channel: a number,
none, or a math function that couldn’t be worked out yet. - Color
- A
<color>. - Component
- One typed value in a property’s value.
- CssWide
- The CSS-wide keywords, which every property takes.
- Expect
- What a value must be, for
Math::fits. - Grammar
- A grammar, parsed.
- Kind
- What a dimension measures.
- Leaf
- A number, a percentage or a dimension: a calculation’s leaves.
- Math
Function - A math function other than
calc(), which only groups. - Model
- How a color’s channels are to be read.
- Node
- A calculation tree, CSS Values 4 §10.8.
- Predefined
- A
color()space. - Relative
Channel - One channel of a relative color, as written.
- Rounding
round()’s rounding strategy.- Space
- A colour space a colour can be worked out in.
- Specified
- A property’s specified value.
- Unit
- A unit, from the dimension tokens CSS knows.
Functions§
- expand
- Parses a shorthand’s value and splits it into a value for each of its
longhands, in the order the spec lists them; a longhand the value
leaves out gets its initial value. A longhand that is itself a
shorthand (
border-widthinborder) is followed by its own. A longhand gives itself. - number_
to_ string write_numberinto a new string.- parse_
declaration_ value - Parses a declaration’s value for its property.
- parse_
value - Parses
valueas a value ofproperty,--custom properties included. - properties
- Every property in the table, sorted by name.
- property
- Looks a property up by name, ignoring ASCII case.
- substitute
- Replaces every
var()invaluefromcustom. - substitute_
value - Substitutes
var()in a property’s value and parses what results, as computing a value withvar()in it does. An error is “invalid at computed-value time”, which the cascade turns intounset. - write_
components - Writes typed values as CSSOM serializes a specified value: separated by spaces, commas followed by one.
- write_
number - A number, a value with a unit, written as CSSOM serializes one: to six
significant figures, without an exponent,
-0as0.
Type Aliases§
- Property
- A property:
PropertyDatawith its grammar parsed.