News for hackers. Stuff that matters.
Re:CSS WG resolved to officially work on native custom funct... by art0rz on Tuesday February 13, 2024 @10:59AM (#39358865)
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.
Re:CSS WG resolved to officially work on native custom funct... by est on Tuesday February 13, 2024 @11:41AM (#39359532)
Who else remembers the expression() from IE5.5 ?
Re:CSS WG resolved to officially work on native custom funct... by lycos on Tuesday February 13, 2024 @11:52AM (#39359704)
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.
Re:CSS WG resolved to officially work on native custom funct... by no_wizard on Tuesday February 13, 2024 @12:04PM (#39359880)
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

Re:CSS WG resolved to officially work on native custom funct... by micromacrofoot on Tuesday February 13, 2024 @11:57AM (#39359774)
"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.
Re:CSS WG resolved to officially work on native custom funct... by JoshTriplett on Tuesday February 13, 2024 @12:28PM (#39360161)
> 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.

Re:CSS WG resolved to officially work on native custom funct... by no_wizard on Tuesday February 13, 2024 @12:58PM (#39360591)
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.

Re:CSS WG resolved to officially work on native custom funct... by SahAssar on Tuesday February 13, 2024 @02:35PM (#39361801)
Even LTS releases get much more rapid updates than the upgrade cycle for browsers used to be. I remember stuff getting released in IE8/IE9 and thinking it'd be 10 years before I could properly use it on large customer projects (and I was right pretty much right).
Re:CSS WG resolved to officially work on native custom funct... by lycos on Tuesday February 13, 2024 @12:37PM (#39360275)
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.
Re:CSS WG resolved to officially work on native custom funct... by JoshTriplett on Tuesday February 13, 2024 @12:45PM (#39360409)
I'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 , 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.

Re:CSS WG resolved to officially work on native custom funct... by reaperducer on Tuesday February 13, 2024 @02:53PM (#39362024)
I'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.

Re:CSS WG resolved to officially work on native custom funct... by lycos on Tuesday February 13, 2024 @01:01PM (#39360625)
Without even looking up statistics or searching the web the easiest answer for you; ever hear of iOS / iPadOS and how every browser is Safari underneath and not everyone installs update (or uses devices that can't be updated); like elderly people who are also real users? Yet it is also (depending on region) the most popular mobile and tablet platform?

FYI This is my last reply to you, you're just looking to be proven right it's not a useful discussion.

Re:CSS WG resolved to officially work on native custom funct... by JoshTriplett on Tuesday February 13, 2024 @01:20PM (#39360847)
> 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".

Re:CSS WG resolved to officially work on native custom funct... by realusername on Tuesday February 13, 2024 @01:11PM (#39360742)
> Which browsers that matter aren't evergreen at this point?

Safari on iOS, which is still tied to the OS version and not evergreen yet.

Re:CSS WG resolved to officially work on native custom funct... by robertoandred on Tuesday February 13, 2024 @01:58PM (#39361323)
Except the OS updates automatically so it's effectively evergreen.
Re:CSS WG resolved to officially work on native custom funct... by realusername on Tuesday February 13, 2024 @02:35PM (#39361803)
While iOS has a quicker update scheme as Android, it's nowhere near as fast as an evergreen browser.

If I look at https://iosref.com/ios-usage there's only half of the users on last year update and 15% of users lagging behind on a 2+ year old browser version.

So expect your average users to have a new Safari version ~1.5 year after it's been out. So the answer to that is no, it's not fast enough to be considered evergreen.

Re:CSS WG resolved to officially work on native custom funct... by kevingadd on Tuesday February 13, 2024 @03:14PM (#39362270)
Parsing a ton of CSS expansions from a preprocessor is likely more expensive in both CPU and RAM than evaluating simple functions.
Re:CSS WG resolved to officially work on native custom funct... by nine_k on Tuesday February 13, 2024 @04:47PM (#39363288)
Also, 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-exploit...