question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hsl(a)/rgb(a) values don't seem to work

See original GitHub issue
@value backgroundColor: hsla(220, 13.0%, 18.0%, 1);
.background {
  background-color: backgroundColor
}

Seems to result in

background-color: hsla(220);

Is that a bug? Or am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lukehedgercommented, Nov 16, 2015

I’m using v1.1.1 via css-loader (with c24881e fix) but have come across a similar issue with commas…

This:

@value easing: cubic-bezier(.77, 0, .175, 1);

transition: all easing .5s;

compiles to:

transition: all cubic-bezier(.77 .5s;

In case it helps, another comma edge-case that also doesn’t compile correctly:

@value retina: (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi);
0reactions
geelencommented, Nov 2, 2015

Fixed by https://github.com/css-modules/postcss-modules-values/commit/c24881e338f9857d2ecc91a4d10074b15d37552e (ignore the issue number in the commit message, need more ☕)

Read more comments on GitHub >

github_iconTop Results From Across the Web

color IE fallback for rgba() does not work - Stack Overflow
RGBA is not supported in IE. However, as it sees your color: style, it attempts to evaluate it and reverts to the default...
Read more >
HSL: a color format for humans - Cloud Four
Here's what an HSL color looks like: hsl(180, 50%, 50%) . Similar to RGBA, there's also an HSLA format which adds an alpha...
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 >
OKLCH in CSS: why we moved from RGB and HSL
The main problem with HSL is that it has a cylindrical color space. Every hue has the same amount of saturation ( 0—100%...
Read more >
A Guide To Modern CSS Colors With RGB, HSL, HWB, LAB ...
More recently, we have been able to use HSL (hue, saturation, lightness) values, with the hsl() and hsla() color functions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found