Emit transparent colors as rgba(0, 0, 0, 0)
See original GitHub issueWhen using rgba(0, 0, 0, 0)
or hsla(0, 0, 0, 0)
in SCSS, the corresponding CSS shows transparent
.
Apparently IE8 interprets rgba(0, 0, 0, 0)
different from transparent
. We needed this to fix a hover issue (see also http://stackoverflow.com/questions/3998917/ie8-div-hover-only-works-when-background-color-is-set-very-strange-why).
What to expect when defining rgba(0, 0, 0, 0)
in SCSS and how can you force to compile to rgba(0, 0, 0, 0)
?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Transparent color vs rgba(0,0,0,0) - Stack Overflow
The "a" in (rgba) and its zero setting (x,x,x,0) is the ALPHA channel that sets the opacity/transparency of the first three combined colors...
Read more >CSS Colors - W3Schools
An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0...
Read more >A Guide to CSS RGBA Colors - WebFX
RGBA is a type of CSS color value that allows us to set its opacity and transparency. Learn more about RGBA colors.
Read more ><color> - CSS: Cascading Style Sheets - MDN Web Docs
The RGB color model defines a given color in the sRGB color space according to its red, green, and blue components. An optional...
Read more >How To Use CSS Hex Code Colors with Alpha Values
Learn how to use hex codes in CSS and change the transparency of the ... In others words, a single-digit only has 10...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve talked with Chris, and we’ve decided to officially drop support for versions of IE prior to IE9, which was the first to support
rgba()
. As such, we’ll start emitting all colors with no alpha component asrgba(0, 0, 0, 0)
across the board.I just encountered the same problem @bazzel, had me pulling out my hair when I just could not figure out why I couldn’t hover over an element. Turns out, under certain conditions, if you give an element background-color: transparent, no hover is triggered in IE10, but if I changed it to rgba(0,0,0,0) in the output CSS manually, it worked fine.
IMO, that is just another reason as to why the way a colour is defined by an author should be preserved throughout the compilation process.
Also, you can workaround this by doing:
rgba(0, 0, 0, 0.0001)
.