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

Convert stylesheet colors to use css vars #2755

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

edwardloveall
Copy link

Supporting #2732

This converts all sass color variables (and a couple other variables) to use native css variables instead.

There's a lot here! If you'd prefer, I can figure out how to break this up into smaller parts; maybe one per var or something. It also doesn't get rid of all sass variables. I could go even farther and do that if we want. Just let me know.

@@ -1,19 +1,19 @@
@each $flash-type, $color in $flashes {
.flash-#{$flash-type} {
background-color: $color;
color: mix($black, $color, 60%);
color: color-mix(var(--black) 60%, $color);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are technically the only css vars left. CSS (as far as I know) does not have any type of map equivalent. Even so, these get replaced with normal CSS vars in the end.

@nickcharlton
Copy link
Member

Thanks! Yeah, it's a bit big!

It also doesn't get rid of all sass variables. I could go even farther and do that if we want.

…have you seen a path to removing Sass entirely? That'd be fun.

@edwardloveall
Copy link
Author

Thanks! Yeah, it's a bit big!

Cool, I'll work on breaking it up.

…have you seen a path to removing Sass entirely? That'd be fun.

I think so. I haven't done a full audit or anything but css has come a long way. I think the blocking factor would be which old browsers does administrate need to support.

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

Successfully merging this pull request may close these issues.

2 participants