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 Variable Based Theming #108

Open
Tropix126 opened this issue Feb 9, 2022 · 2 comments
Open

CSS Variable Based Theming #108

Tropix126 opened this issue Feb 9, 2022 · 2 comments

Comments

@Tropix126
Copy link

CSS Custom Properties allow you to easily define values in a variable. Currently it seems that theme stylesheets just hardcode in the colors to given elements, which probably won't scale well if you plan to add new features to the site that need theming.

Custom properties are supported on all major browsers.

@jakergrossman
Copy link
Contributor

I agree that using CSS custom properties are great for sites with multiple themes (I've used it myself in my portfolio page), though some themes may do more than just fill in the elements with colors, like aurora.css, which uses keyframe animations to move the background gradient.

While I'm sure there is a solution that can handle things like this I'm not sure what it would look like.

Also, IIRC @briano1905 isn't very keen on adding new features to the site, but that may have changed.

@Tropix126
Copy link
Author

Theme's don't have to only be variable changes, they're still just stylesheets. Using variables will just make modifying things like colors or radii easier and less boilerplate-y.

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