Several properties manually are defined to allow initial and inherit, currently:
background-size
width
height
max-width
max-height
min-width
min-height
text-decoration-line
text-decoration-style
text-decoration-thickness
Separately, inherit is allowed for every property, but only in the style attribute, not in an extracted style block (the code that does this is only in the CSS AttrDef).
This PR removes the special case in AttrDef_CSS and the explicit enum definitions in the CSSDefinition, and replaces both with checks in AttrDef_CSS and Filter_ExtractStyleBlocks against an enum of initial, inherit, and unset, making all three values allowed for all defined properties in both the attribute and block contexts.
unset, which hasn't previously been allowed here, is comparable to initial and inherit: for properties that inherit by default, it acts as inherit, for those that don't, it acts as initial.
Support for the universal or "CSS-wide" property values (
initial
,inherit
, andunset
, see https://www.w3.org/TR/css-values/#common-keywords) is mixed at the moment.Several properties manually are defined to allow
initial
andinherit
, currently:Separately,
inherit
is allowed for every property, but only in thestyle
attribute, not in an extracted style block (the code that does this is only in the CSS AttrDef).This PR removes the special case in AttrDef_CSS and the explicit enum definitions in the CSSDefinition, and replaces both with checks in AttrDef_CSS and Filter_ExtractStyleBlocks against an enum of
initial
,inherit
, andunset
, making all three values allowed for all defined properties in both the attribute and block contexts.unset
, which hasn't previously been allowed here, is comparable toinitial
andinherit
: for properties that inherit by default, it acts asinherit
, for those that don't, it acts asinitial
.