-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Useful utility function -> obtain all CSS variables on the website easily #1247
Comments
noice |
Most the code seems done, feel free to PR this as part of the "tips and tricks" section of our docs. If your not confident with doing so we can do it for you. |
this is... I love you |
What's the benefit of this over simply viewing the variables which are almost always on the |
Update See #1250 |
Some websites don't put all their variables on the root and can be tricky to find all the variables, but I think the best outcome from this is that we can now manipulate every single CSS variable with code (see linked PR) |
I think this results in lower quality userstyles. I too used to use color matching tools to get the right colors for variables to match the website, but that isn't what this is about, not every color makes sense to match in Catppuccin; some should be accent, some should follow existing standards/rules in Catppuccin (base-mantle-crust usage in backgrounds, subtext0/1/text usage), etc. I should also mention that the CIE 2000 algorithm for finding similar colors you mentioned can have a lot of false positives / inaccuracies. |
Ok, I'll make sure to include that what do you think if I add wording around how this should only be used as a rough start ? just to kickstart etc. |
Is there an existing issue outlining your problem?
Describe your issue.
Here's a cool utility function that will yield every single CSS variable on any site
On github we get:
Use case:
Makes it easier to style websites that use CSS variables for their theme
Source: https://css-tricks.com/how-to-get-all-custom-properties-on-a-page-in-javascript/
The text was updated successfully, but these errors were encountered: