4 ms·
The benefit of this is that it runs in the browser. E.g. you can change a CSS variable and the change would propagate to wherever it's being used.
by art0rz 3y ago
The benefit of this is that it runs in the browser. E.g. you can change a CSS variable and the change would propagate to wherever it's being used.
- deleted 3y ago[deleted]
- est 3y agoWho else remembers the expression() from IE5.5 ?
- lycos 3y agoYeah 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.
- micromacrofoot 3y ago"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.
- no_wizard 3y agoSpeed 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
- JoshTriplett 3y ago> Yeah but only in evergreen browsers 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.
- lycos 3y agoThere 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.
- JoshTriplett 3y agoI'm genuinely curious to hear which non-evergreen browsers people are having to support. Niche mobile browsers from ancient Android phones? Some of the more obscure mobile browsers from https://caniuse.com/ciu/comparison https://caniuse.com/ciu/comparison , or even more obscure ones that aren't listed there? To what extent are those platforms unable to support a better browser? For instance, Firefox works all the way back to Android 5.0.
- lycos 3y ago[flagged]
- JoshTriplett 3y ago> and not everyone installs update (or uses devices that can't be updated); That's exactly the kind of example I was looking for, thank you; the idea that people would run iOS and not get Safari updates had not occurred to me, and that's an entirely valid use case and a potentially large user cohort for some sites. Sites with such users would indeed be unable to make immediate use of features just because they're in evergreen browsers. Thanks for the explanation. I know that there are plenty of people out there who are not looking to change their mind. This was not one of those cases. In this case, I was looking to hear the benefit of the experiences behind your comment of "Some of us need to", and hearing it helped me update from "it's safe to rely on evergreen browsers" to "it may still be necessary for some sites to check statistics on usage of old Safari among their users, and adapt accordingly".
- reaperducer 3y agoI'm genuinely curious to hear which non-evergreen browsers people are having to support. Browsers on devices (sometimes iPads, sometimes Android) that are inside touch-screen kiosks. Some of the ones I work with are in places so remote, it would take me three or four days to reach them if a software update goes wrong. Then another three or four days to get back to the office.
- kevingadd 3y agoParsing a ton of CSS expansions from a preprocessor is likely more expensive in both CPU and RAM than evaluating simple functions.
- nine_k 3y agoAlso, the downside of it is that it runs in the browser. The more universally executable code you have to run in a low-trust environment which is a WWW document, the more interesting vulnerabilities can creep in. It's too late though: https://portswigger.net/research/ublock-i-exfiltrate-exploiting-ad-blockers-with-css https://portswigger.net/research/ublock-i-exfiltrate-exploit...