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

New updates let us use css variables, but how do we declare them? #568

Closed
thisbit opened this issue Sep 6, 2023 · 2 comments
Closed

New updates let us use css variables, but how do we declare them? #568

thisbit opened this issue Sep 6, 2023 · 2 comments
Labels
feature Features, refactoring, enhancements, improvements triage Awaiting review

Comments

@thisbit
Copy link

thisbit commented Sep 6, 2023

Description

I want to set some cusom variables so I can use them accross the site to maintain consistency.

so something like

:root {
--var-one" value-one;
--var-one" value-one;
--var-one" value-one;
--var-one" value-one;
}

And then have it available accross the site. In customizer, in blocks too.
Applying a variable to

.element {
font-weight: var(--var-one);
}

that should reflect in the customizer view, in the block editor, and ofcourse on the live site.
I realize there is no UI to do this yet, but is there a workaround, what is the recomended way for this?

References

@thisbit thisbit added the feature Features, refactoring, enhancements, improvements label Sep 6, 2023
@github-actions github-actions bot added the triage Awaiting review label Sep 6, 2023
@diggeddy
Copy link
Collaborator

Custom CSS Variables should be declared in your child theme stylesheet.
There is no planned UI in the theme for adding them.
We are considering writing CSS variables for the main theme settings. Which will be raised under a new issue.
Closed

@thisbit
Copy link
Author

thisbit commented Sep 27, 2023

Including custom vars in theme makes a lot of sense since now we have them in blocks and not there ... good progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features, refactoring, enhancements, improvements triage Awaiting review
Projects
None yet
Development

No branches or pull requests

2 participants