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

gray(x%) as a shortcut for rgb(80,80,80) #512

Closed
adius opened this issue Sep 11, 2012 · 7 comments
Closed

gray(x%) as a shortcut for rgb(80,80,80) #512

adius opened this issue Sep 11, 2012 · 7 comments
Labels
enhancement New feature or request

Comments

@adius
Copy link

adius commented Sep 11, 2012

I think it would be cool if there was the possibility to use the rgb function with just one value as a shortcut.
What do you think?

@chriseppstein
Copy link

gray(n%) would feel more natural to me.

@Anahkiasen
Copy link

+1 for this. I've had a gray() (well actually grey) function in my files for months, I use it all the time. Very very useful.

@nex3
Copy link
Contributor

nex3 commented Sep 14, 2012

I'm definitely not willing to overload rgb() in a way that may end up being incompatible with the CSS spec. gray() may be doable, though.

@timohofmeijer
Copy link

gray() became part of the CSS4 draft 😄 .
gray() = gray( [<number> | <percentage>] [, <alpha-value>]? )
https://drafts.csswg.org/css-color/#grays

@nex3 nex3 added CSS compatibility Support the CSS spec help wanted Extra attention is needed and removed enhancement New feature or request under consideration The Sass team is debating whether to do this labels Sep 18, 2015
@bkazi
Copy link

bkazi commented Apr 2, 2016

Hi,
I was hoping to get some guidance on this issue being a new contributor. I have come up with an implementation for gray() that is based on the way rgb() is done and it seems to work. I would like to know what would be the proper way to go about adding such a feature and what considerations should be taken.
Thanks

@nex3
Copy link
Contributor

nex3 commented Apr 4, 2016

@bkazi Just send a pull request and we'll walk you through the process 😃

@nex3 nex3 added enhancement New feature or request planned We would like to add this feature at some point and removed CSS compatibility Support the CSS spec labels Apr 5, 2018
@nex3 nex3 changed the title rgb(80) as a shortcut for rgb(80,80,80) gray(x%) as a shortcut for rgb(80,80,80) Apr 5, 2018
@nex3
Copy link
Contributor

nex3 commented Sep 21, 2018

Closing this in favor of #2078.

@nex3 nex3 closed this as completed Sep 21, 2018
@nex3 nex3 removed help wanted Extra attention is needed planned We would like to add this feature at some point labels Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants