News for hackers. Stuff that matters.
Re:The web just gets better with Interop 2024 by move-on-by on Thursday February 01, 2024 @06:55PM (#39223215)
I only do some web stuff very casually, so I’m definitely not the target demographic. Having said that, the most glaring WebKit omission for me is lack of SVG favicon support. Really baffling. All those Apple-specific icons with the different dimensions- really a pain for a casual web dev like me.
Re:The web just gets better with Interop 2024 by CharlesW on Thursday February 01, 2024 @08:10PM (#39223706)
FWIW, Safari supports 1-color SVG favicon using this format:

  <link rel="mask-icon" href="/favicon.svg" color="#990000">
If you use something like Vite, you can also auto-generate all favicon/homes screen icon creation from a single source image.
Re:The web just gets better with Interop 2024 by move-on-by on Thursday February 01, 2024 @08:15PM (#39223746)
Haha! Yes, I actually was aware of this specific case where an SVG favicon works. I suppose it was disingenuous of me to say it’s not supported altogether, but I’ve yet to have an opportunity to use it due to the 1-color restriction.
Re:The web just gets better with Interop 2024 by efields on Thursday February 01, 2024 @07:06PM (#39223302)
SVGs don't scale the way you want them to. You can't make a (for example) 256px square image, even a vector, look good at 24px just by vector transforms.
Re:The web just gets better with Interop 2024 by move-on-by on Thursday February 01, 2024 @08:10PM (#39223708)
I suppose that makes sense for a professional web dev- but it still feels like an arbitrary feature gap and is the first ‘speed bump’ in standing up a simple website for safari. Just because your pixel-perfect corp might rather have specific image renders for all screen sizes doesn’t really explain why I can’t put a SVG in there and call it a day. I can’t imagine my svg-to-png converter does a much better job of it. It’s all just a hassle. Again, happy to recognize I’m not a front end expert and not the target demographic.
Re:The web just gets better with Interop 2024 by TheCoreh on Thursday February 01, 2024 @07:45PM (#39223553)
With HiDPI/Retina displays, that 24px is actually 48px or 72px, so the need for pixel hinting is much less commonplace than it was 10 or 15 years ago.

Also, nothing's really stopping most developers from just scaling it naively to those tiny sizes, in fact it's what commonly happens.

I agree we should keep support for custom icons for each size, and it's probably a best practice, but shouldn't be a _requirement_ anymore.

Re:The web just gets better with Interop 2024 by globular-toast on Friday February 02, 2024 @03:27AM (#39226436)
How many people have HiDPI displays? It seems to me apart from phones people mostly don't.
Re:The web just gets better with Interop 2024 by drcongo on Friday February 02, 2024 @05:55AM (#39227283)
Everyone with a Mac?
Re:The web just gets better with Interop 2024 by globular-toast on Friday February 02, 2024 @08:39AM (#39228405)
So ~10% of users?
Re:The web just gets better with Interop 2024 by drcongo on Friday February 02, 2024 @09:33AM (#39228919)
Plus anyone with a not-cheap-ass Windows / Linux laptop, and anyone who's bought a desktop monitor in the last several years. I can't remember the last time I had to use a screen that wasn't.
Re:The web just gets better with Interop 2024 by globular-toast on Friday February 02, 2024 @10:00AM (#39229310)
What's "not-cheap-ass"? The standard "developer spec" type laptops from Dell etc. seem to still come with 1080p screens despite costing upwards of 1k credits. If you search for 27" monitor on Amazon you'll find 1080p models coming up, maybe some QHD ones. I can't imagine many offices kitting out with 4K monitors unless they actually need them.
Re:The web just gets better with Interop 2024 by DaiPlusPlus on Thursday February 01, 2024 @07:55PM (#39223613)
That's a valid reason for non-Apple browsers to prefer or even require raster (non-SVG) image files, such as a 16x16 favicon for a 96dpi display device like a typical office desktop or low-end laptop.

Whereas Safari only runs on macOS + iOS, which in-turn only runs on Apple hardware, and all Apple hardware today is going to run at ~140dpi or above - so pixel-perfect art just isn't required - and if someone plugs a (relatively) low-res TV into a Mac then the OS is going to downsample everything down anyway, and (most) users don't seem to care about that.

Re:The web just gets better with Interop 2024 by moron4hire on Thursday February 01, 2024 @07:18PM (#39223385)
That really depends on the style of the artwork
Re:The web just gets better with Interop 2024 by andybak on Thursday February 01, 2024 @07:45PM (#39223551)
Less than you think.
Re:The web just gets better with Interop 2024 by runarberg on Thursday February 01, 2024 @07:54PM (#39223596)
SVGs support media queries. I haven’t tested this, but shouldn’t you be able to alter (or optimize) the image based on the size of the viewport?
Re:The web just gets better with Interop 2024 by paulddraper on Thursday February 01, 2024 @08:52PM (#39223981)
Disagree.

Pixeling editing is a <4% improvement.

Re:The web just gets better with Interop 2024 by nox101 on Thursday February 01, 2024 @10:34PM (#39224687)
Aren't Apple's emoji made from vectors? They seem to scale well. Is SVG missing the features to do as well?
Re:The web just gets better with Interop 2024 by JimDabell on Friday February 02, 2024 @05:59AM (#39227309)
They scale well in the sense that they display the same thing at different sizes without loss of quality. But that’s not the only thing that matters. The primary goal of an icon is legibility.

A large text editor icon might have a pad with a pencil, squiggles on the page, rings binding the pages at the top, etc. But if you scale that down, it might lose legibility.

For good icon design, you don’t want the same thing but smaller, you want fewer, simpler elements. So you might drop the rings at the top, then as you get smaller you might drop the squiggles on the page, and if you go small enough, you might want to change to just having the pencil.

Most people don’t bother with this. They just shrink things down. If that’s what you do, then SVG solves that problem. But that’s not great icon design. Great icon design needs to adapt to smaller sizes, not just grow and shrink.

Re:The web just gets better with Interop 2024 by psYchotic on Friday February 02, 2024 @07:23AM (#39227813)
Not to detract from your argument (which I agree with), but SVG _can_ technically solve that problem using CSS. Here's a link that demonstrates this: https://tympanus.net/codrops/2014/08/19/making-svgs-responsi...
Re:The web just gets better with Interop 2024 by JimDabell on Saturday February 03, 2024 @12:14AM (#39237705)
Another article here specifically about favicons:

https://web.dev/articles/building/an-adaptive-favicon

Unfortunately, I tried the demo and even though it’s supposed to work in Chrome, it didn’t for me. Nor with Safari. Have you gotten it working with favicons anywhere?

Re:The web just gets better with Interop 2024 by clementmas on Thursday February 01, 2024 @07:23PM (#39223410)
That's a good point. We shouldn't have to generate all these icons.

I also wish we could style <select> lists. Like adding flags to <option> elements.

No mention of CSS page transitions or scroll-driven animations which can also remove some boilerplate JS.

Re:The web just gets better with Interop 2024 by madeofpalk on Thursday February 01, 2024 @07:54PM (#39223597)
There is this "Open UI" W3C effort which is supposed to be moving forward styling Select elements. Improved <select> is flagged in Chrome at the moment - it'll be great if this (and the other stuff in Open UI) actually get ratified into standards and ship. https://open-ui.org/components/selectlist/
Re:The web just gets better with Interop 2024 by MatthiasPortzel on Thursday February 01, 2024 @09:30PM (#39224222)
Semi-related, but Chrome won't use an SVG favicon if an ico favicon is present. (https://bugs.chromium.org/p/chromium/issues/detail?id=145085...) I ship a PNG favicon and an SVG favicon.
Re:The web just gets better with Interop 2024 by alwillis on Friday February 02, 2024 @02:12AM (#39225969)
> All those Apple-specific icons with the different dimensions- really a pain for a casual web dev like me.

You'll be glad to know you it's not like that anymore; you just need one Apple-specific icon now [1]:

    <link rel="icon" href="/favicon.ico" sizes="32x32">
    <link rel="icon" href="/icon.svg" type="image/svg+xml">
    <link rel="apple-touch-icon" href="/apple-touch-icon.png"><!-- 180×180 -->
    <link rel="manifest" href="/manifest.webmanifest">
[1]: https://evilmartians.com/chronicles/how-to-favicon-in-2021-s...