Any error with hsla (0, 0%, 0%, 0), becoming hsla (0, 0, 0, 0)? (missing percent sign)

I set the text color to hsla(0, 0%, 0%, 0) to hide it. But sometimes it becomes hsla(0, 0, 0, 0) , which cannot be executed by the browser.

I can fix this if I go to the site using incognito mode. I have no idea if this is a bug in Chrome, from the server or a cache problem. If so, why is this happening so often and how can I fix it?

hsla (0, 0%, 0%, 0) becomes hsla (0, 0, 0, 0) in the browser

+2
source share
1 answer

Zero value should be without units in css.

Length refers to distance measurements. The format for the length value (indicated in this specification) is (with or without a decimal point) followed by a unit identifier (e.g. px, em, etc.). After zero length, the device identifier is optional.

See http://www.w3.org/TR/CSS2/syndata.html#length-units for more details.

Here is another fooobar.com/questions/154729 / ... supporting this reason.

+5
source

Source: https://habr.com/ru/post/1233349/


All Articles