Expand description
CSS cascade & inheritance.
Walks the BoxTree and propagates inheritable properties from parent to child when the child has not specified them. Properties not in the inheritable list are left untouched (initial values applied at paint time).
Inheritable properties (per CSS spec, restricted to our scope):
colorfont-familyfont-sizefont-weightfont-styleline-heightletter-spacingtext-alignwhite-spaceoverflow-wrapvisibilitytext-decoration(not strictly inheritable but used as such here)
All other properties (background, padding, border, transform, etc.) are NOT inherited.
Functionsยง
- inherit_
from - Inherit unset child properties from the parent.
parentis the already resolved style (post-cascade) of the parent node.