Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-typed-om] Math functions that correspond css math functions declared in css-values-4 #1090

Open
DevSDK opened this issue Apr 10, 2023 · 2 comments

Comments

@DevSDK
Copy link
Contributor

DevSDK commented Apr 10, 2023

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!

@SebastianZ
Copy link

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

@tabatkins
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants