TTML/changeProposal019

From W3C Wiki

< Change Proposal Index

Fixes to style syntax - OPEN

  • Owner: Glenn Adams.
  • Started: 14/06/13

Issues Addressed

  • ISSUE-210 - Alpha values in rgba() - Open.
  • ISSUE-222 - Alpha values outside [0,1] - Closed - [1].
  • ISSUE-223 - Font family value syntax - Closed - [2].
  • ISSUE-225 - Font size as percentage of container size - Open.

Summary

A number of style properties we chose a value syntax for in TTML 1.0 no longer match up to the CSS syntax.

For example in rgba() values we specify a number between 0 and 255. Whereas CSS no allows 0.0 to 1.0 or 0% to 100%

However we now have a slight problem in adopting the new syntax, since 1 is now ambiguous.

I suggest we change the syntax to:

a-value 
    : component-value              // clamped to 0-255
    | ('0'|'1') '.' [0-9]+         // clamped to 0.0-1.0
    | [0-9]+'%'                    // clamped to 0-100%

This is not 100% perfect, as someone cutting and pasting from CSS may copy an rgb(x,y,z,1) value and it will show up as rgba(x,y,z,0.004). So Editors should convert to rgba(x,y,z,1.0). However all other legal values will work, and more importantly going from TTML to CSS should now be more straightforward.


We should also admit the vh, vw, vmin and vmax values as metrics.

Edits to be applied

Edits applied

Impact

References