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

syntax: variables #105

Closed
alixander opened this issue Nov 16, 2022 · 3 comments · Fixed by #1473
Closed

syntax: variables #105

alixander opened this issue Nov 16, 2022 · 3 comments · Fixed by #1473
Labels
compiler feature Something new

Comments

@alixander
Copy link
Collaborator

alixander commented Nov 16, 2022

E.g. have $vars.light_primary hold the hex code which you reference as background on a bunch of objects

@alixander alixander added feature Something new compiler labels Nov 16, 2022
@alixander
Copy link
Collaborator Author

Screen Shot 2022-11-22 at 2 37 15 PM

@wycats
Copy link
Contributor

wycats commented Mar 1, 2023

@alixander is there a sketch of a design for this? I'm very interested in the idea (I'm switching from mermaid to d2 in the documentation for https://starbeamjs.com/, and the need to represent common concepts like "invalidation" or "output" in a consistent way is the biggest hurdle so far).

I've created a very simplistic preprocessor in my own codebase for style variables, but I'd also be interested in helping with the overall design.

@alixander
Copy link
Collaborator Author

we should have a concept of "reserved vars". e.g. for color codes to override themes.

#1327 (comment)

Probably more instances of it being useful

@alixander alixander mentioned this issue Jul 11, 2023
@github-project-automation github-project-automation bot moved this to Done in D2 Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler feature Something new
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants