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

Handle var() globally #504

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zakybilfagih
Copy link
Collaborator

Closes #417, we handle this the same way as cascading values.
If we detect the use of var(), it will be unsafe and the value will be rendered as string.

Copy link

vercel bot commented Aug 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
styled-ppx ⬜️ Ignored (Inspect) Visit Preview Aug 11, 2024 0:41am

Copy link
Owner

@davesnx davesnx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a cool addition, and wonder if keeping var() in the Parser is still a good idea. It's not part of the spec, which makes it a bit annoying but overall is a better idea than the global render fn.

Mostly because we allow interpolation + variables on the same property. WDYT?

@zakybilfagih
Copy link
Collaborator Author

zakybilfagih commented Aug 14, 2024

I see your point, I think we can put them exactly the same place as we put on them Parser grammar.
I also have some thoughts on how we place <interpolation> on the grammar, will create an issue abt that.

@zakybilfagih zakybilfagih marked this pull request as draft August 14, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CSS variables
2 participants