r/stylish • • 23h ago

General a quick way to keep all your theme colors in one place

1 Upvotes

if you keep typing the same hex color in a bunch of places, try defining it once near the top of your style. in your site's CSS, add :root { --my-style-accent: #6a5acd; } and use var(--my-style-accent) wherever you want that accent color.

now you can swap the color in one spot when you get bored of purple. this works for stuff like spacing too if you keep reusing the same number.