Yeah but only in evergreen browsers once they implement it.. plus now you are making the browser do more work compared to just having simple CSS files that don't have to do complicated things.
"CSS doesn't have to do complicated things" is already a thing of the past. There are plenty of pseudo selectors and custom properties now that can be quite complex.
Which browsers that matter aren't evergreen at this point?
EDIT: got an answer downthread, apparently at least some sites have to deal with old versions of the mobile Safari engine because of old iPhones/iPads that can't be updated and can't run other browser engines. Another good reason to wish that iPhones/iPads permitted other browsers.
The real question is: how many of your users allow the browser to auto update?
This is the most important question nowadays. there are still organizations where this is tightly controlled, they use LTS releases that don't always get the updates as fast or the same etc.
There is no definitive way to answer your question. It depends entirely on your target audience and how much effort your company is willing to put towards support a, I will admit, likely minority. Some of us need to.
Speed can be optimized over time, particularly as they collect huge real world usage and can optimize for common patterns. That's one unspoken benefit of having features in the browser vs pushing them to build tools.
Its not always appropriate but I feel CSS benefits more often than not for this
micromacrofoot|2 years ago
JoshTriplett|2 years ago
Which browsers that matter aren't evergreen at this point?
EDIT: got an answer downthread, apparently at least some sites have to deal with old versions of the mobile Safari engine because of old iPhones/iPads that can't be updated and can't run other browser engines. Another good reason to wish that iPhones/iPads permitted other browsers.
no_wizard|2 years ago
This is the most important question nowadays. there are still organizations where this is tightly controlled, they use LTS releases that don't always get the updates as fast or the same etc.
lycos|2 years ago
realusername|2 years ago
Safari on iOS, which is still tied to the OS version and not evergreen yet.
kevingadd|2 years ago
no_wizard|2 years ago
Its not always appropriate but I feel CSS benefits more often than not for this