News for hackers. Stuff that matters.
Re:Using: Has() as a CSS Parent Selector and much more by Tistron on Saturday August 20, 2022 @04:27AM (#32530356)
The most surprising thing for me is that Safari is first with this.

Am I in a HN bubble where everyone are always complaining about safari, or is that genuinely unusual?

Re:Using: Has() as a CSS Parent Selector and much more by MatthiasPortzel on Saturday August 20, 2022 @07:59AM (#32531360)
Because Chrome has such a dominant market share, Safari doesn’t get credit when they implement features first. No one’s going to use or even hear about a Safari-only feature because the people who are making the websites are using Chrome.

On the other hand, if Safari doesn’t support a feature Chrome supports, then that’s a problem for Safari because developers are going to be using that feature.

There’s this sort of naive attitude that “all browsers should just implement all the specifications.” But in reality all browsers take a fair amount of leeway with what specifications they implement, what timeline they implement them in, and etc. There are plenty of fundamental differences between engines that effect browser compatibility, that haven’t been addressed for years.

“Safari is behind Chrome” is just way too linear of a narrative. Web compatibility is a patchwork of over a thousand specifications.

Re:Using: Has() as a CSS Parent Selector and much more by solardev on Saturday August 20, 2022 @09:08AM (#32531801)
Why can't Safari just use Blink? What's the value of having more than one engine?
Re:Using: Has() as a CSS Parent Selector and much more by wixyu on Saturday August 20, 2022 @09:40AM (#32531986)
See the moribund state of web development from approximately 2003 - 2013 when the web was bound to a monoculture of Internet Explorer. Current the Blink team are running behind both WebKit and Mozilla in meeting the agreed upon goals for interop 2022. https://wpt.fyi/interop-2022
Re:Using: Has() as a CSS Parent Selector and much more by solardev on Saturday August 20, 2022 @09:58AM (#32532097)
> See the moribund state of web development from approximately 2003 - 2013 when the web was bound to a monoculture of Internet Explorer.

I think that's a bit of an exaggeration/retconning. Between NetCaptor, Maxthon, etc., that's the era that gave us huge innovations: tabbed browsing, popup blockers, ad blocking, site groups, search in the URL bar, and so much more. And CSS, and GeoCities, and streaming video and animated applets/games/Flash...

There was so much innovation going on, the real difficulty was in being able to display your content to your audiences. CanIUse wasn't around then and there were huge incompatibilities between IE, Netscape, Opera, eventually Phoenix, etc.

It wasn't the diversity in engines that allowed innovation, it was the market exploring different features and eventually converging on the ones that people really wanted. If anything, having redundant engines slowed down actual development. IE6 was king for a few short years, and in those few years the web was more stable than it ever was before or since, and content was king instead of engine differences.

For now Chrome has the best of both worlds: market dominance and rapid innovation. They have no meaningful challengers anymore... Firefox/Gecko is dead and WebKit is only a thing because of iOS, and thankfully it at least shares a heritage with Blink.

I think your link proves the opposite point: that the web ecosystem is wasting time on interop instead of actual features. We don't need three renderers that do roughly the same thing, but nothing exactly the same. It was Chrome's hegemony over the last 5-10 years that actually gave us huge leaps in web usability, dev specialization, best practices, and content creation. The real changemaker was making Javascript safe and fast enough that native in-browser programming became a reality.

There is no such thing as web standards in reality, only Blink and WebKit's mostly-compatible implementations. If we could move past that delusion and just converge resources on Blink/V8 and just evolve that, the web would be better off for it.

Re:Using: Has() as a CSS Parent Selector and much more by malepoon on Saturday August 20, 2022 @11:36AM (#32532803)
Remember (P)NaCl? Or WebSQL? Google has a bad reputation for pushing poorly designed web "standards".

Thanks to Mozilla we then got asm.js, wich evolved into Wasm and ultimately replaced NaCl.

Now imagine there was one engine and Google could implement whatever they wanted? RIP privacy and well-designed standards.

Re:Using: Has() as a CSS Parent Selector and much more by jmisavage on Saturday August 20, 2022 @09:27PM (#32536612)
Don't forget Dart. They tried to push that as a replacement to JavaScript for a while. Just like what Microsoft tried with VBScript years ago.

Then Flutter came out of nowhere and reintroduced everyone to Dart again.

Re:Using: Has() as a CSS Parent Selector and much more by solardev on Saturday August 20, 2022 @01:06PM (#32533552)
Why can't similar debates happen around a single engine?

Mozilla is largely Google funded anyhow. If they wanted to drop funding and go their own way they could do so anytime.

Re:Using: Has() as a CSS Parent Selector and much more by kitsunesoba on Saturday August 20, 2022 @01:29PM (#32533718)
Google has far too much power over the direction of Blink for any meaningful debate to take place. They have a tendency to steamroll through already and this behavior would no doubt intensify if Blink were the only game in town.

It would have a far better chance of working if the Chrome/Blink team were spun out of Google into a nonprofit that is protected from the financial influence of Google.

Re:Using: Has() as a CSS Parent Selector and much more by nwienert on Saturday August 20, 2022 @01:10PM (#32533591)
Wow, hard to disagree with a post more.

Chrome has been doing some terribly shady stuff with Blink whether we look at their various tracking proposals, “portals” which are a blatant attempt at ossifying Google as basically the internet itself, or the extreme standard-stuffing they continue to participate in to ensure no further competitors can pop up.

But beyond that nearly every point you raise here is completely off.

WebKit is superior to Blink, in almost all ways. It’s simply a much better browser and has been for a couple years now. Faster, lighter, and supports nearly everything you need. Every time I’m forced use Chrome, it’s like having to walk through a shady neighborhood - I literally can’t wait to close it. That thing sucks memory and battery in a way no app should, and Googles numerous shady tactics in trying to get you to login so they can avoid your privacy settings is downright hostile.

Leaps in best practices? Is that a joke? Web Components pushed by them is one of the worst things to happen to the web. Half of the standards they’ve pushed are actually regressions.

And again, Chrome is much slower and more bloated. If anything Safari is far better today for delivering a more native experience.

And your last paragraph is very much the kicker. The funny thing is the Safari thing is the only thing keeping Chrome in check. If this is what they’ve tried to get away with with Safari, I don’t understand how you can be advocating for even less competition. Interop is an incredible project that will save developers massive amounts of time, while ensuring we don’t end up with the most privacy invasive and manipulative company of all time controlling the web for the next 1000 years. Thank god for Safari.

Re:Using: Has() as a CSS Parent Selector and much more by DaiPlusPlus on Sunday August 21, 2022 @01:21AM (#32537619)
How was/is Portals about Google? It’s just a way to progressively enhance navigation between pages.
Re:Using: Has() as a CSS Parent Selector and much more by nwienert on Sunday August 21, 2022 @02:51AM (#32537961)
PR and development was led by them and it was designed so that they could basically turn the AMP frame into a first class spec so they could capture your activity past the search page.
Re:Using: Has() as a CSS Parent Selector and much more by swatcoder on Saturday August 20, 2022 @11:58AM (#32532969)
The browser is the pipe between enterprises and users on the web.

You might want an advertising company to have unilateral control over the shape of that pipe, but some of us feel more comfortable knowing there’s a viable alternative with competing priorities.

Re:Using: Has() as a CSS Parent Selector and much more by Cyberdog on Saturday August 20, 2022 @02:32PM (#32534170)
Why can't computers just use Windows? What's the value of having more than one operating system?
Re:Using: Has() as a CSS Parent Selector and much more by ayushnix on Saturday August 20, 2022 @04:21PM (#32534894)
> What's the value of having more than one engine?

I, for one, wouldn't like using the web with a web browser built by an advertising company pushing for Manifest V3 and killing adblockers as a result.

Re:Using: Has() as a CSS Parent Selector and much more by dragonwriter on Saturday August 20, 2022 @01:09PM (#32533580)
> Why can’t Safari just use Blink?

Given the history of those two, that’s amusing.

Re:Using: Has() as a CSS Parent Selector and much more by masswerk on Saturday August 20, 2022 @01:10PM (#32533592)
Historically, the question is to be asked the other way round. (So why Blink?)
Re:Using: Has() as a CSS Parent Selector and much more by chasingtheflow on Saturday August 20, 2022 @09:24PM (#32536600)
Blink is a fork of safari’s engine
Re:Using: Has() as a CSS Parent Selector and much more by tambourine_man on Saturday August 20, 2022 @04:51AM (#32530489)
It’s not. Safari is just not always blindly adopting whatever Chrome does and their priorities are very different.

Safari has consistently been the fastest, more battery and privacy concerned browser.

Safari is WebKit, which historically has given us a lot of the CSS standard niceties we take for granted.

Re:Using: Has() as a CSS Parent Selector and much more by 6510 on Saturday August 20, 2022 @07:05AM (#32531069)
webp and lazy loading are so powerful that having to do things without it really feels like IE. The big difference is that IE users for some reason failed to install something better. Safari users are locked in.
Re:Using: Has() as a CSS Parent Selector and much more by tambourine_man on Saturday August 20, 2022 @08:29AM (#32531541)
Safari supports lazy image loading, which is probably what you want. Just not iFrame lazyloading, which you shouldn’t be using all that much anyway.

It also supports webp, even though I never use it. It’s a Google thing, not widely supported by image editors and which fails to be consistently better than a properly optimized jpeg.

If you thing you need webp try running it through MozJPEG first

Re:Using: Has() as a CSS Parent Selector and much more by Cyberdog on Saturday August 20, 2022 @02:35PM (#32534198)
MozJPEG is truly magical. My image editor of choice Acorn added it and I've been using it heavily ever since when I want to share a screenshot of reasonable fidelity but would rather it not be 3.8MB.

https://flyingmeat.com/acorn/

I would like to see a decent true successor to JPEG which does stuff like alpha channels, but the annoying extend-embrace-extinguish approach Google used with WebP has turned me off of considering it very seriously.

Re:Using: Has() as a CSS Parent Selector and much more by solardev on Saturday August 20, 2022 @08:56AM (#32531729)
Side note: Webp isn't terribly useful for replacing JPEG, but it IS a very good alternative to PNGs with transparencies (alpha channels).
Re:Using: Has() as a CSS Parent Selector and much more by tambourine_man on Saturday August 20, 2022 @01:50PM (#32533858)
Again, have you seen crushPNG and similar tools?

To me, a format must offer significant advantages to overtake decades old standards.

Re:Using: Has() as a CSS Parent Selector and much more by solardev on Saturday August 20, 2022 @08:11PM (#32536263)
Crushpng is a size optimized png encoder, right? Is there a particular statistic/test you're referring to?

Webp does lossy compression with alpha, think photographs with transparent parts. Png can't do that lossily and jpegs can't be transparent.

Re:Using: Has() as a CSS Parent Selector and much more by tambourine_man on Saturday August 20, 2022 @10:28PM (#32536889)
Oh, but they can :)

Dittering, quantization and lots of dirty tricks:

https://pngmini.com/lossypng.html

Re:Using: Has() as a CSS Parent Selector and much more by solardev on Sunday August 21, 2022 @12:19AM (#32537387)
Or... Just use webp?
Re:Using: Has() as a CSS Parent Selector and much more by tambourine_man on Sunday August 21, 2022 @09:33AM (#32540024)
Which won’t open in Photoshop 2021, or your parents notSoSmart TV.

Questions like: will you be able to open them in 20 years, does this version of ImageMagic supports it, are not things I’d want to deal with daily.

Yeah, thanks but no thanks.

Hard to compete with standards with expired patents and equivalent if not better performance when the other side is sponsored by a single company. Especially one not particularly known for long term commitment to their projects.

Re:Using: Has() as a CSS Parent Selector and much more by solardev on Sunday August 21, 2022 @10:37AM (#32540613)
I don't think webp was ever meant to be an archival format, especially when used lossily. I wouldn't want a dithered blurred png to be the one archived image I have, either.

Typically I've seen webp served at the CDN or client, where a png or jpeg alternative is also available, and where (hopefully) the website owner has the original asset somewhere safe.

Between "now" and "nobody uses webp" anymore, it's still a super useful format to speed up pages for a majority of users. That doesn't mean you should rely on it to be a safe archival medium, but that's not the only consideration.

Of course nobody is going to force you to use that (or really notice if you don't). It's just one image format out of gazillions.

Re:Using: Has() as a CSS Parent Selector and much more by 6510 on Sunday August 21, 2022 @03:41PM (#32543672)
JPEG artifacts are ugly. With webp they sometimes improve the picture.

With blurry backgrounds for example JPEG invents new colors. webp just blurs.

Re:Using: Has() as a CSS Parent Selector and much more by iaml on Saturday August 20, 2022 @08:43AM (#32531633)
Safari team is really strange with their priorities, most of the time they are dead set on implementing specs last, but every once in a while they decide a feature is important and they implement it faster than everyone else. For example, backdrop-filter was supported in safari way back in 2015, while other browsers added it multiple years later.
Re:Using: Has() as a CSS Parent Selector and much more by samwillis on Saturday August 20, 2022 @08:50AM (#32531676)
I suspect it is the influence internally from other product teams. WebKit is used in so many places within MacOS and iOS, someone recently wrote a blog post looking at the CSS used by Apple, :has() and some other WebKit only css was heavily used.
Re:Using: Has() as a CSS Parent Selector and much more by zarzavat on Saturday August 20, 2022 @09:48AM (#32532037)
This is how we got <canvas>. Apple needed it for the MacOS. Dashboard feature.
Re:Using: Has() as a CSS Parent Selector and much more by lieferant1210 on Sunday August 21, 2022 @04:02AM (#32538245)
Do you happen to have a link to this blog post?
Re:Using: Has() as a CSS Parent Selector and much more by easrng on Saturday August 20, 2022 @01:35PM (#32533764)
Safari is also ahead on color space support.
Re:Using: Has() as a CSS Parent Selector and much more by no_way on Saturday August 20, 2022 @05:47AM (#32530750)
They are first but it's not like other browsers are far behind, Chrome is already shipping :has, being first for one feature doesn't mean much while you are years behind implementing non controversial features already in other browsers, not even talking about Safari bugs..
Re:Using: Has() as a CSS Parent Selector and much more by have_faith on Saturday August 20, 2022 @04:30AM (#32530374)
You’re not wrong, Safari is often behind on features. Unless Apple deem that feature important of course.
Re:Using: Has() as a CSS Parent Selector and much more by akira2501 on Saturday August 20, 2022 @04:42AM (#32530441)
They're behind on features _and_ you have to work around their aggressive privacy choices. It's my least favorite testing phase in any release.
Re:Using: Has() as a CSS Parent Selector and much more by akie on Saturday August 20, 2022 @05:28AM (#32530674)
I love their aggressive privacy choices.
Re:Using: Has() as a CSS Parent Selector and much more by solardev on Saturday August 20, 2022 @09:09AM (#32531808)
It seems so fake... Apple adds "privacy" by crippling their competitors, then turns around and adds a bunch of their own intrusive advertising. They don't care about you, they just want to be the next Google
Re:Using: Has() as a CSS Parent Selector and much more by drawfloat on Saturday August 20, 2022 @09:40AM (#32531987)
I love them to an extent. There should be some sort of request API available for temporarily disabling the more stringent media restrictions for a session.

I worked on a media heavy fashion site a few years ago and dealing with Safari not allowing you to dynamically add new audio/video elements with auto play (or to auto play at all in low battery mode) was a real headache. By default it’s great, just offer the option to get permission for experiences that require it.

Re:Using: Has() as a CSS Parent Selector and much more by matheusmoreira on Saturday August 20, 2022 @10:56AM (#32532477)
Auto playing media is not something that should ever be allowed anyway. Apple forcing sites to respect their users is actually a great reason to buy Apple products.
Re:Using: Has() as a CSS Parent Selector and much more by drawfloat on Monday August 22, 2022 @12:28PM (#32553715)
Autoplay on page load, no. But you’re going to severely limit the web experiences available to Safari users (and probably in turn the number of people who use Safari) if you don’t allow some way of getting reasonable consent to auto play media after page load.

Currently most solutions are to load a number of empty audio buffers when the user first clicks and repurpose those for auto playing content later.

If a user has visited a multimedia focused web site (eg: online catwalk show), why not allow them to opt in for that session rather than force them to have a cut down experience?

Re:Using: Has() as a CSS Parent Selector and much more by matheusmoreira on Monday August 22, 2022 @04:23PM (#32556714)
Because allowing these perfectly reasonable things also means allowing abuse. We can't have nice things because of people who think they can just autoplay random stuff we don't care about while we're trying to concentrate on some text. There is nothing more aggravating than opening a website and having some unexpected loud sound start autoplaying.
Re:Using: Has() as a CSS Parent Selector and much more by matheusmoreira on Saturday August 20, 2022 @10:49AM (#32532441)
> you have to work around their aggressive privacy choices

There are work arounds? Looks like they need to be even more aggressive.

Re:Using: Has() as a CSS Parent Selector and much more by akira2501 on Saturday August 20, 2022 @02:46PM (#32534277)
I remember a time when this site didn't take the most uncharitable reading of everything all the time.

And yes. Making a streaming application. The CDN that the media is provided through uses cookies to coordinate "side band" metadata. On Safari, there's no way to get at the metadata due to the cookie policy. So, you get the media, but literally no metadata or features associated with it. It's a worse experience for any Safari user and doesn't actually enhance their privacy in any way whatsoever.

The workaround was to get the streaming provider to allow the correlation ID that would normally be conveyed through a cookie to be conveyed through URL parameters instead.

So.. to the extent that I could track you between two sessions, the workaround means I still can. Not that I need to track you, but because I need to correlate two streams between two different servers onto one device.