rgba(#hex, 1) compiles to hex again
See original GitHub issuesass versions tested: 3.2.19 and 3.4.12
compiling error
background: rgba(#cccccc, 1)
compiles to
background: #cccccc;
workaround:
background: rgba(#cccccc, 0.999999)
compiles to the desired
background: rgba(204, 204, 204, 1.0);
important for e.g. inline-svgs in FF
Even though it makes no difference for the usual background the rgba()
value is important when it comes to colors inside a path in inline-svgs (e.g. Firefox can only handle rgb/rgba there).
Also when I ask for a rgba value I expect to get a rgba value, no matter what. 😃
Issue Analytics
- State:
- Created 9 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
LESS Compiler Converts RGBA() to Hex - css - Stack Overflow
LESS' rgba() function takes a percentage between 0% and 100% . You're passing 128 , which is fully opaque.
Read more >RGBA to HEX Converter - Simple CSS Media Query Generator
Use our simple tool below to convert your RGBA (R, G, B, A) color to a Hex Color CSS code. It's not lazy,...
Read more >Color Formats in CSS - hex, rgb, hsl, lab - Josh W Comeau
Introduction. CSS has a whole slew of different color formats: hex codes, rgb(), hsl(), lch(), the list goes on! Which one should we...
Read more >From Hex to Color and Back in SwiftUI - Marco Eidinger
From Color to Hex in SwiftUI This includes colors you create from a Core Graphics color, from RGB or HSB components, or from...
Read more >8-Digit Hex Codes? | CSS-Tricks
The formats are sometimes referred to as #RRGGBBAA and #RGBA. The AA part is a hex representation of 0-100 is like: 0 =...
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
Sass tries to maximize browser compatibility when it comes to colors, so your only choice is to create a function specifically for this.
Output:
@cimmanon buärks! Thanks! 😄