4 ms·
What advantage does this give when we have SASS and other systems that support variables? This is a spec going through draft-review-deployment so we can type 3
by Novashi 8y ago
What advantage does this give when we have SASS and other systems that support variables?
This is a spec going through draft-review-deployment so we can type 3 less characters?
- detaro 8y agoUntil now, the variants where #rrggbb and #rgb, so the extension to alpha is parallel: #rrggbbaa, #rgba. I personally like that extension, so you can just add an alpha component to a color without transforming it to a different form first. It's also relevant to people using automated systems, since those automatically can choose the most compact representation of a color possible in their output. > This is a spec going through draft-review-deployment so we can type 3 less characters? The key phrase above is is part of, it's one of the smaller aspects of the spec.
- metaloha 8y agoThis doesn't have anything to do with variables, it's simply adding an opacity value to hex-encoded colours. So `#ffff` (or `#ffffffff`) is the sames as `rgba(255, 255, 255, 1)`, and `#ffffff7f` would be `rgba(255, 255, 255, 0.5)`. Until now, if you wanted to assign a colour with opacity, you had to use the `rgba()` format. Now you can just hex-encode it :)