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

Properly handle alpha units #1525

Closed
4 of 5 tasks
nex3 opened this issue Nov 15, 2014 · 5 comments
Closed
4 of 5 tasks

Properly handle alpha units #1525

nex3 opened this issue Nov 15, 2014 · 5 comments
Labels
CSS compatibility Support the CSS spec requires deprecation Blocked on a deprecation cycle specs written Specs have been written for the feature and at least one implementation passes them

Comments

@nex3
Copy link
Contributor

nex3 commented Nov 15, 2014


Currently rgba() and hsla() completely ignore units on the $alpha argument. They should interpret percentages per spec and fail for any other unit.

@nex3 nex3 added CSS compatibility Support the CSS spec requires deprecation Blocked on a deprecation cycle labels Nov 15, 2014
@nex3 nex3 added this to the 4.0 milestone Aug 21, 2015
@nex3 nex3 removed this from the 4.0 milestone Jul 13, 2018
@nex3
Copy link
Contributor Author

nex3 commented Jul 13, 2018

This is handled correctly by Dart Sass, but it looks like it's still marked as TODO for LibSass.

@xzyfer Is there an issue tracking this on the LibSass side yet?

@prakhar-pal
Copy link

prakhar-pal commented Sep 27, 2018

The spec at http://dev.w3.org/csswg/css-color/#typedef-alpha-value says that percentages(0-100%) and number(0-1) are allowed for alpha argument.
My understanding from issue description is that it should fail when anything other than % are given as argument. So,
.card{ color: rgba(255,255,255,0.5); }
should fail, but
.card{ color: rgba(255,255,255,50%); }
should pass? Kindly clarify.

@nex3
Copy link
Contributor Author

nex3 commented Sep 27, 2018

@lawki These functions are intended to allow unitless numbers between 0 and 1 as well.

@prakhar-pal
Copy link

Got it, thanks.

nex3 added a commit to sass/sass-spec that referenced this issue Oct 15, 2018
@nex3 nex3 added the specs written Specs have been written for the feature and at least one implementation passes them label Oct 16, 2018
nex3 added a commit to sass/sass-spec that referenced this issue Oct 16, 2018
@nex3
Copy link
Contributor Author

nex3 commented Oct 26, 2020

Closing this out because LibSass is now deprecated and we aren't expecting to add any additional features to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS compatibility Support the CSS spec requires deprecation Blocked on a deprecation cycle specs written Specs have been written for the feature and at least one implementation passes them
Projects
None yet
Development

No branches or pull requests

2 participants