TTML/changeProposal019

From W3C Wiki
Jump to: navigation, search

Fixes to style syntax - OPEN

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

Issues Addressed

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