css-houdini-drafts
css-houdini-drafts copied to clipboard
[css-typed-om] Math functions that correspond css math functions declared in css-values-4
Hi folks,
I noticed that CSS Typed OM Level 1 is now missing support for CSS math functions that are part of the CSS Values and Units Module Level 4.
I wonder if it was just missing or having some reason.
Thanks!
I assume they are missing from Typed OM because they are serialized as numeric values. E.g. if you have transform: rotate(atan(1));, the atan(1) is serialized as CSSUnitValue with {value: 45, unit: 'deg'}.
Though for value creation it might make sense to add specific interfaces for the different mathematical functions. So the example from above could be created via a new CSSMathAtan(1).
But I'm just speculating. Maybe @tabatkins or @FremyCompany can shed some light on why the different math functions currently don't have their own interfaces in Typed OM.
Sebastian
No, they're just missing because I haven't gotten to representing them. They can absolutely persist into any of the value stages that TypedOM can return.