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

Support CSS variables #580

Open
geoffrey-eisenbarth opened this issue Oct 7, 2024 · 5 comments
Open

Support CSS variables #580

geoffrey-eisenbarth opened this issue Oct 7, 2024 · 5 comments

Comments

@geoffrey-eisenbarth
Copy link
Contributor

Discussion on the discord seemed to support this idea (with support from Carson), using the following syntax:

set --variable to value
@1cg
Copy link
Contributor

1cg commented Dec 17, 2024

@geoffrey-eisenbarth
Copy link
Contributor Author

I would like to take a stab at a PR for this, but it might be post NYE before I can get to it.

@1cg
Copy link
Contributor

1cg commented Dec 19, 2024

Seems like it should support scoping of some kind:

https://blog.logrocket.com/css-variables-scoping/

@1cg
Copy link
Contributor

1cg commented Dec 19, 2024

maybe

  set --variable of :root to value

to do this we'll likely need to change the lexer to recognize a double dash followed by an alpha as a single token of a new type, and then make it act like a property.

We should also add :root to the hyperscript zoo so that will work as a property reference w/o messing w/ the parser.

@1cg
Copy link
Contributor

1cg commented Dec 19, 2024

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

No branches or pull requests

2 participants