Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hsl color problem in Firefox

I am trying to declare the border of a div using hsl() like this:

border: 2px solid hsl(0,200,105);

I am using Firefox 3.5 and there is no border being rendered at all. The same code works perfectly if hsl() is replaced with rgb()

I read somewhere that Firefox supports hsl() and hsla()

Am I doing something wrong?

and if hsl() is not supported, does anybody have any code to convert hsl to rgb?

like image 320
KJ Saxena Avatar asked Sep 11 '25 11:09

KJ Saxena


1 Answers

According to the CSS specs, the syntax should be:

hsl(240, 100%, 50%);

Here's a nice tutorial on Working with HSL in CSS, and a useful converter.

like image 173
Kobi Avatar answered Sep 13 '25 02:09

Kobi