Maps a cue's WebVTT positioning settings to inline CSS. Pure and DOM-free so
the (branchy) placement logic is unit-testable in isolation.
A cue with neither line nor position set flows in the renderer's
bottom-anchored, centered container (the common subtitle case). Otherwise it
is absolutely positioned: size → width, position/positionAlign →
horizontal, line/lineAlign/snapToLines → vertical (percentage lines, or
whole rows counted from the bottom for negative integers), align → text
alignment, vertical → writing mode.
Maps a cue's WebVTT positioning settings to inline CSS. Pure and DOM-free so the (branchy) placement logic is unit-testable in isolation.
A cue with neither
linenorpositionset flows in the renderer's bottom-anchored, centered container (the common subtitle case). Otherwise it is absolutely positioned:size→ width,position/positionAlign→ horizontal,line/lineAlign/snapToLines→ vertical (percentage lines, or whole rows counted from the bottom for negative integers),align→ text alignment,vertical→ writing mode.