mdn / browser-compat-data

This repository contains compatibility data for Web technologies as displayed on MDN
https://developer.mozilla.org
Creative Commons Zero v1.0 Universal
4.98k stars 2.01k forks source link

CSS <color> - missing compatibility data for floats in hsl() notation #11693

Open danburzo opened 3 years ago

danburzo commented 3 years ago

What information was incorrect, unhelpful, or incomplete?

BCD does not currently contain an entry on the browser support for float numbers in the hsl() / hsla() color notation, as it has for rgb() / rgba(). My current need is defining the hsl() serialization in a color manipulation library, where I'd make an informed decision whether to round saturation and lightness to the nearest integer.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl()

danburzo commented 3 years ago

I've used the hsl(3e1, 1e2%, 0.5e2%) test value to asses browser support in Browserstack. Here are my results:

I would assume the exponential notation implies full support for the <number> CSS type in hsl() syntax.

Full HTML test page ```html hsl() e-notation

hsl(3e1, 1e2%, 0.5e2%)

```
danburzo commented 3 years ago

Actually, it looks like when using strictly floats (e.g. hsl(30.5, 90.6%, 48.3%)), the browser support goes much further back. iOS Safari 3, for example, has no problem displaying it.