Extra closing parenthesis when using RGBa(), HSLa() as fallback value
See original GitHub issueHi,
This is how my vars look like:
--color-background-transparent-9: hsla(200, 20%, 25%, 0.9);
--color-background-tint: hsla(200, 15%, 90%, 1);
This is how I use them on an element:
background: var(--color-background-transparent-9, rgba(51, 68, 77, 0.9));
color: var(--color-background-tint, #e2e7e9);
This is how css-vars-ponyfill converts them:
background: hsla(200, 20%, 25%, 0.9));
color: hsla(197, 14%, 90%, 1);
Notice the extra closing parenthesis in the background property.
After a bit of investigation, it seems that the issue is the fallback value. If I replace the rgba(51, 68, 77, 0.9) with #e2e7e9 it works.
Does anyone have this issue before? Do you may know any workaround?
Thanks in advance! George
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Parsing of rgb()/rgba()/hsl()/hsla() CSS color values ... - GitHub
When setting the canvas' fill/stroke style, rgb() / rgba() and hsl() / hsla() color values with missing close-parentheses such as rgb(255, 0, 0 ......
Read more >Setting Backgrounds & Gradients - Learn to Code HTML & CSS
Transparent Backgrounds. When using an RGBa or HSLa value as a transparent background color, it's a good idea to provide a fallback color,...
Read more >Glassmorphism for Firefox - Medium
The filter: blur() makes the entire element blurred. Adjust the pixel value in parentheses to achieve the desired degree of blurriness. Here's ...
Read more >The CSS Handbook - The Valley of Code
HSL and HSLa ... Interacting with a CSS Variable value using JavaScript; 19.5. ... rgba() lets you add the alpha channel to enter...
Read more >CSS References · Prince Documentation
Prince supports opacity . It supports some of the extensions of the color property. rgba() is supported in builds after Prince 11, hsl()...
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
Fixed in 1.15.3.
Thanks for the excellent description and debugging efforts. Made the fix much easier. 😄
Let me know if the fix resolves your issues. I’ll hold off closing the issue until then.
Yep, it works great for me too! Many thanks for the instant fix!