Skip to content

Style attribute applicability

Nigel Megitt edited this page Nov 9, 2016 · 4 revisions

This page reformats the relevant data in the TTML1 spec relating to style attributes' inheritance, relationship to parents, and applicability.

Namespaces are omitted for simplicity - most are in tts; multiRowAlign and linePadding are in ebutts.

Note that padding is defined by Tech3350 to apply to p in addition to region, but is only defined by TTML to apply to region.

The following "Relationship to parent" values are used to describe the interpretation of the attribute in relationship to the style defined on the parent element:

  • none - a non-inherited attribute has no relationship to its parent element
  • overwrites - an attribute overwrites the value of the style inherited from the parent element
  • multiplies - an attribute modifies (by multiplication) the value of the style inherited from the parent element; this only applies to percentage values of the fontSize attribute
Attribute Initial Inherited Relationship to parent Applicable to May be specified on
backgroundColor transparent no none body div p region span style
color n/a yes overwrites span style
direction ltr yes overwrites p span style
displayAlign before no none region region
extent auto no none tt region tt, region
fontFamily default yes overwrites span style
fontSize 1c yes overwrites unless %; if % then multiplies parent span style
fontStyle normal yes overwrites span style
fontWeight normal yes overwrites span style
lineHeight normal yes overwrites p style
linePadding 0c yes overwrites body div p style
multiRowAlign auto yes overwrites p style
origin auto no none region region
overflow hidden no none region region
padding 0px no none region p span region, style
showBackground always no none region region
textAlign start yes overwrites p style
textDecoration none yes overwrites span style
unicodeBidi normal no none p span style
wrapOption wrap yes overwrites span style
writingMode lrtb no none region region