public sealed class InheritedPropertiesWhich properties a child gets from its parent without asking.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Inheritance is not a convenience, it is what makes a stylesheet finite. Setting color on a panel and having every label inside it follow is the difference between a theme and a per-element assignment for every element.
The list is CSS's, and it is short for a reason worth knowing: a property inherits when inheriting it is nearly always what someone wants. Text properties inherit; box properties do not, because a panel with padding: 8px whose every descendant also got 8px would be unusable. Getting this list wrong in either direction produces a UI that looks broken in a way that reads as a layout bug.
Custom properties (--x) always inherit and are not in the list — they are recognised by their name, since there is no finite set of them.
⚠ This cascade inherits specified values; CSS inherits computed ones, and the difference is not cosmetic. A child inheriting font-size: 1.5em as text would resolve that em against its own parent a second time, so a size meant to be applied once compounds at every level — a two-deep tree comes out at 2.25× where CSS says 1.5×, and the error grows with depth. CSS avoids it by computing font-size to an absolute length before anyone inherits it.
font-size is therefore removed from this list and inherited in computed form by Vixen.Ui instead, which is the same thing CSS does and in the same place — an element that declares none simply keeps its parent's resolved pixel size. Nothing else needs the specified string, and UiElement.FontSize is the value every consumer actually wants.
line-height and letter-spacing have since joined it, computed and inherited by Vixen.Ui for the same reason and by the same mechanism. Both take relative units, and both are read by the text layout, so the bounded one-level error they used to carry was one the renderer could see.
⚠ line-height is the one where computing is not simply resolving. A unitless 1.5 inherits as the number and is multiplied by each descendant's own font size, where 1.5em inherits as the length the ancestor resolved. That distinction is the whole reason the unitless form exists, so the computed value carries which of the two it is rather than collapsing both to pixels.
The gap stays open for word-spacing and text-indent, which nothing reads yet. Computing a value no consumer looks at would be work with no way to be wrong, and they can join the others on the day something wants them.
Methods (4)
public InheritedProperties(NameTable properties)Interns the inherited property names into a table.
public bool Inherits(int property)Whether a property inherits.
public bool InheritedPortionDiffers(ComputedStyle before, ComputedStyle after)Whether two styles differ in any property a child would have inherited.
public static bool IsCustomProperty(string name)Whether a property name is a custom property.
Used by (2)
- StyleResolverVixen.Ui.Styling
- StyleUpdaterVixen.Ui.Styling