News for hackers. Stuff that matters.
Re:CSS Text Box Trim by reaperducer on Friday May 03, 2024 @11:37AM (#40248903)
This will be very useful, especially for vertical aligning, but as of today is essentially unsupported:

Looks like Safari beta is the only current option.

It's always funny how Safari gets so much heat on HN for being "behind" on things, when it's so often ahead on features.

For example, it's the only browser that supports hanging-punctuation, and supported JPEG2000 since 2011.

Re:CSS Text Box Trim by atonse on Friday May 03, 2024 @12:34PM (#40249529)
I think Safari's priorities closely map Apple's priorities and DNA.

So when it comes to presentation (how text is presented, typography, color spaces, HiDPI, etc, all things that benefit an overall design, user experience) Safari always seems to be way ahead of the rest.

But when it comes to stuff that developers want (stuff that mostly makes devs more happy), it may tend to lag more behind.

That mirrors Apple's general priorities of often prioritizing user experience over dev experience.

And even though I'm a developer, I happen to kind of agree with that prioritization..... on most days :-)

Re:CSS Text Box Trim by agos on Friday May 03, 2024 @12:44PM (#40249648)
I remember something in the whatwg ideals saying something along the lines of: users before developers before user agent developers
Re:CSS Text Box Trim by philistine on Friday May 03, 2024 @05:40PM (#40252707)
Apple prioritizes thus: Apple first, its users second, its devs third.

They never stray from that.

Re:CSS Text Box Trim by atonse on Friday May 03, 2024 @09:20PM (#40254033)
Well, that’s all the browser vendors. Their interests first.
Re:CSS Text Box Trim by mholt on Friday May 03, 2024 @12:10PM (#40249286)
Safari IS often behind on things. It's the ONLY major browser that doesn't support 'overflow-anchor: auto' even though that's been the default in all other browsers for years now. https://caniuse.com/css-overflow-anchor

Their TP finally implements it, but years late.

Re:CSS Text Box Trim by hbn on Friday May 03, 2024 @12:39PM (#40249581)
Apple's hesitance on implementing browser features can also be a positive. They held off on web push forever which is a good thing because web push is horrible and just opened the floodgates for everyone's grandma's Samsung phone being constantly covered with online gambling ads. When Apple finally implemented it, they did it so it's only allowed for web pages saved to your homescreen like an app which I think is a good compromise.

Safari is the only thing stopping Google from running rampant with implementing new "web standards" because all browsers on the iPhone are Safari, so everyone needs to make sure their site works in a browser other than Chrome.

This is looking to be on borrowed time unfortunately because regulators are looking to force Apple to allow other browser engines. So look forward to Google's stranglehold on the internet being further cemented.

Re:CSS Text Box Trim by ashtonmeuser on Friday May 03, 2024 @09:40PM (#40254135)
Safari also entirely disables CSS multi-column when printing per this 17 year old bug: https://bugs.webkit.org/show_bug.cgi?id=15546.
Re:CSS Text Box Trim by wnevets on Friday May 03, 2024 @11:57AM (#40249140)
> It's always funny how Safari gets so much heat on HN for being "behind" on things, when it's so often ahead on features.

To be fair to HN this has been a relatively recent change. Jen Simmons and Webkit/Safari teams have really stepped up their game.

Re:CSS Text Box Trim by robertoandred on Friday May 03, 2024 @12:20PM (#40249396)
It's not recent. Safari has always been pushing and adding things, just not what Google wants.
Re:CSS Text Box Trim by afavour on Friday May 03, 2024 @01:38PM (#40250214)
All of these things are relative, let's not pretend they aren't. Safari has always been pushing _some_ things and has been significantly behind in others. From my own memory bank: Chrome implemented WebGL in 2010, Apple took until 2014 to finally bring it to iOS Safari. That actively held back work I was doing.

It's very easy to dismiss any web improvement as being something Google is shoving down everyone's throat but it's not true, a lot of them are things developers are crying out for.

Re:CSS Text Box Trim by philistine on Friday May 03, 2024 @05:39PM (#40252691)
I can relate to your work being impacted by webGL not shipping on iPhone, but we both know why Apple took so long: because they invest less than Google in their browser, and the investment they make cannot regress speed nor battery life. I side with Apple on that view.

They’ve recently started investing more in the browser, but haven’t moved on degrading battery life. I wonder why they’re suddenly investing (cough cough DMA)

Re:CSS Text Box Trim by afavour on Friday May 03, 2024 @06:55PM (#40253254)
“they don’t allocate resources to the project” is context, not a reason. We’re allowed to resent that choice made by one of the biggest companies in the world.
Re:CSS Text Box Trim by xp84 on Saturday May 04, 2024 @11:03PM (#40261964)
That was the reason?? With something like that I would have assumed it was mainly Apple worrying that big developers might start getting wise-guy ideas like shipping games on the web to avoid the ol’ 30% racket.
Re:CSS Text Box Trim by wnevets on Friday May 03, 2024 @12:32PM (#40249515)
> just not what Google wants.

or what developers like myself want. There was absolutely a significant period of time where it felt like I was dealing with the new IE in the age of evergreen browsers.

Re:CSS Text Box Trim by thekingshorses on Friday May 03, 2024 @12:18PM (#40249381)
Safari is the only browser that doesn't support extending HTML element

https://caniuse.com/?search=Custom%20Elements

Re:CSS Text Box Trim by lelanthran on Saturday May 04, 2024 @12:52AM (#40254949)
> Safari is the only browser that doesn't support extending HTML element

That's a pretty big thing. I did not know.

I have custom elements on this web page, but I haven't had anyone complain that the image doesn't show (or shows up twice) under iOS: https://www.lelanthran.com/chap10/content.html

Re:CSS Text Box Trim by k4rli on Friday May 03, 2024 @11:50AM (#40249042)
Are the features actually useful though? Surely there's a reason why only Safari has them. This textbox trim seems like a fix for badly made fonts
Re:CSS Text Box Trim by robinson7d on Friday May 03, 2024 @11:58AM (#40249155)
It depends on what one considers useful.

E.g. they were also first to support the `:has()` selector/pseudo-class, which I think can be useful for avoiding JS in some cases.

Re:CSS Text Box Trim by joemi on Friday May 03, 2024 @03:56PM (#40251695)
> This textbox trim seems like a fix for badly made fonts

That's not what it is. It's a typographic control that wasn't available in browsers before. It's got nothing to do with fonts being badly made. All textboxes (no matter which font) can be measured from many different places, and this lets you specify (via text-box-edge) which of those many different places you want to consider as the bounds of a specific textbox.

Re:CSS Text Box Trim by amlib on Friday May 03, 2024 @01:16PM (#40249970)
I remember having to jump trough a series of silly hoops just to get audio encoded in Opus to play on Safari browsers. They do indeed drag their feet on seemingly arbitrary things.
Re:CSS Text Box Trim by littlestymaar on Friday May 03, 2024 @02:31PM (#40250761)
Just because Safari can sometimes be ahead, it's still the browser that lags the most. And sometimes we're talking about years behind Chrome and FF (WebRTC being the example I directly suffered from).
Re:CSS Text Box Trim by spartanatreyu on Monday May 06, 2024 @09:54PM (#40281475)
I don't see how hanging-punctuation and JPEG2000 support are worth bringing up when they were so infamous for breaking websites with their poor IndexedDB support (for frankly a stupid amount of time) that it spawned the phrase: "Safari is the new IE".

Not to mention Webms, PWAs, pointer support, etc...