-
Notifications
You must be signed in to change notification settings - Fork 8
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
SCSS Functions for Black/White (with Alpha) #28
Comments
|
@tworrisb What would your function add? black; // normal
color(black); // yours
rgb(white / 0.8); // normal
color(white, 0.8); // yours I only see more typing, with no saved benefit? |
I also agree that I don't see the benefit of that. |
I don't like either proposal over just writing On the one had we have two functions that do the same to one hard-coded colour each. So any deviation of how a design treats these two colours (a previous project had There's less moving parts to just writing |
I was slightly mistaken, So it would be: // normally
color: black;
color: rgb(0 0 0 / 0);
color: rgb(0 0 0 / 0.5);
// with this util
color: black();
color: black(0);
color: black(0.5); |
In sass you can do |
For a lot of projects we use white and black with an Alpha channel for colors/backgrounds/lines etc. Would it be convenient if we create 2 functions for this? So you can do something like:
Implementation is probably quite simple, but something in the lines of:
The text was updated successfully, but these errors were encountered: