3 ms·
Surprising to see #rrggbbaa to be <1%, when #rrggbb is the most popular. If you’re already used to hex then why switch to eg rgba when you need alpha? I find it
by klabb3 3y ago
Surprising to see #rrggbbaa to be <1%, when #rrggbb is the most popular. If you’re already used to hex then why switch to eg rgba when you need alpha? I find it quite useful. Maybe it’s recent and less known.
- tomschwiha 3y agoI feel it is easier to read/write rgba(125,125,125,0.9) compared to #7d7d7de6.
- zarzavat 3y agoIndeed the RGB values don’t lend themselves to manual tweaking so #ABCDEF is acceptable, but the alpha value is often set manually and most people are not good at writing numbers in hex compared to decimal.
- pilaf 3y agoI think it may be because unlike RGB values, which one usually doesn't pick by hand but rather visually through a color picker, the opacity value is something you may want to tweak by hand, and decimal is easier than hex for that purpose.
- csande17 3y agoThe #rrggbbaa syntax was indeed introduced much later -- https://caniuse.com/css-rrggbbaa https://caniuse.com/css-rrggbbaa says it only started getting into browsers in 2016-2017, many years after https://caniuse.com/css3-colors https://caniuse.com/css3-colors added support for rgba().
- jayflux 3y agoYou answered your own question. It’s less known about, by the time the #rrggbbaa syntax came out people would use rgba() for alpha. Some would also argue the rgba() syntax is more readable when alpha is involved. If alpha support came out with hex from the beginning then it may be a different story
- afavour 3y agoI personally far prefer rgb() over #rrggbb, it’s really just muscle memory making me use the latter. So given that #rrggbbaa was introduced later, I don’t and won’t get that muscle memory.
- hwbunny 3y ago99% of the new css features are not known or just unknown, because it's a hassle to use them. Syntax is just plain braindead. Just look at animations, grid and flexbox. These are supposed to fix lots of CSS2 era problems, and they do so in a mindboggingly shitty way. I mean anyone, who was responsible should be shot. And since it's a standard, it won't change for years to come. So the idiots who established these new, contrived CSS syntaxes literally making people go on all fours, because... well, because they have the power to release such a mountain of shit. Microsoft's Internet Explorer bullied every web developer for decades. Now Safari earned the honour of becoming the bully amongst web browsers, with their we just couldn't care less attitude. They do things here and there just a tad bit different, because, well, they are Apple, and everyone can fuck off. Like their fullscreen media query implementation, or the blur rendering outside viewport shenanigans just to name a few of their idiotic choices. And Chrome... we need to wrestle away the browser from Google. The sooner, the better.
- posterguy 3y agoA bit hyperbolic, no? Do you really find grid that hard to work with?