These new viewport units frustrate me immensely, because they have completely ignored the longstanding complete brokenness of viewport units on platforms that don’t use zero-layout-width overlay scrollbars (which currently means pretty much all desktop platforms except macOS by default, and even there it’s at least easily possible to turn off overlay scrollbars). Basically, viewport units are always the wrong thing if there might be scrollbars: they’re broken by design.
Instead they’ve fixed the problem with inconsistency of interpretation of viewport height units on mobile browsers, which was, generally speaking, not something that was broken in the same way as the desktop situation, and there were simple (if non-obvious) practical workarounds for the most likely thing people wanted anyway.
So yeah, the new viewport units are worthwhile for what they improve in mobile browsers, but I’m disgruntled that they’re being presented as fixing viewport unit situation when the people involved have continued to basically ignore what I perceive as the real and most significant problem with viewport units, which has been an issue from the very start in all browsers except Firefox, which used to have a tolerable workaround (essentially: `body { overflow-y: scroll }` would make vw exclude the scrollbar) until it was ripped out of the spec and Firefox because no one else was interested in implementing it for some reason.
In short: the new viewport units are still fundamentally broken by design, only in a way that doesn’t affect most mobile platforms or the default macOS configuration.
https://css-tricks.com/almanac/properties/s/scrollbar-gutter...
Essentially, you can specify if a scrollbar is supposed to take up space or render overlaid on top of content. In the case that a scrollbar takes up space, you can specify if the other side should also have a matching amount of space taken up to keep content centered.
If the above proposal passes (which it probably will do), then there is no more issue with the new viewport units.
Also scrollbar-gutter is a decidedly incomplete solution, only accounting for block axis overflow (thus inline axis size, vi, almost always equivalent to vw), and failing to handle edge-to-edge styling with classic scrollbars when scrollbars aren’t required. So you’re trading one broken thing for another only-slightly-less-broken thing. In order to be properly useful in the presence of things like full-width elements with background colours or images or whatever, it needs to be able to be paired with env(safe-area-inset-*) (though hopefully with logical unit names) so that in the absence of a scrollbar you can opt into drawing in the space reserved for it.
Well, that does say something about the dominance of Chrome...
I’m trying to decide how I feel about that characterisation, and I’m of two minds, but mostly leaning towards “it’s older than you think”.
From an implementation perspective: Firefox has had it for over two years (implemented in early–mid 2019, shipped in December 2019). That’s not especially new in the scheme of things for web features.
From a specification perspective, which certainly doesn’t matter as much but I think should not be completely ignored, it’s even older: CSS Grid started in early 2011, subgrid was added in late 2012, CSS Grid Level 1 became a Candidate Recommendation in September 2016 with subgrid marked as “at risk”, and subgrid was bumped to Level 2 by May 2017, a couple of months after Firefox, Chromium and Safari all shipped Grid in March 2017.
Hmm… Chromium 79 is from about the same time as Firefox 71 which shipped subgrid, did any interesting and quite-visible features land around then? Yeah, there are a few from around that time plus or minus a few releases that I’d be mildly inclined not to call “pretty new”, with a noticeable (though very subjective) correlation with features other browsers have also implemented. My feeling is that if Chromium and Safari had shipped subgrid in December 2019 as well (like all three shipped basic grid in March 2017) it probably wouldn’t be being called “pretty new” now.
That was a fairly useless rabbit hole. :-)
The new layout stack took a little time to get out the door, solving weird issues with certain use cases that just wouldn't be able to be solved with the old layout stack (at least not without becoming a nightmare).
Now that it's out, there's a bunch of commits made from both google and microsoft emails working on reimplementing grid (GridNG) in the new layout system in such a way that grid stage 2 (subgrid) and grid stage 3 (masonry) extensions will be easier to maintain.
(I'm quite sure the demo was built using Firefox, but then the screenshot was taken later.)
I wonder what is more responsible for that; the fact that people don't care about history, or that corporate propaganda has pushed them away from realising it.
If anyone is to blame for showing that a better user experience is possible, it's probably those who pushed for quality UI in native apps, that web apps are trying to match.
Talk to people outside of the tech bubble. They hate what's happening, and also feel powerless to stop it.
The web is way more free and open than operating systems. And if you want to build a website with only HTML and vanilla JS nothing is stopping you. There are websites made in the 90s that still work today. I much prefer the web, web apps and PWAs to their native counterparts.
Need to layout your elements? Great, that's what flex is for. I mean grid. I mean float. I mean the position attribute. I mean tables. I mean the margin attribution.
I'm really looking forward to a better integration of Webassembly. Then we can each pick our own libraries for layout/colors/video etc., and writing a browser will be more like writing a VM than writing huge entire ecosystems.
Instead of one giant test, we have tests for individual features.
In the time since the Acid tests, there has been much more focus on building up the process for sharing tests as a matter of course in browser development; web-platform-tests is the result of that effort. Interop 2022 adds some more public accountability on top of web-platform-tests, which hopefully creates some of the same incentives as Acid tests for everyone to get the same set of features above the bar where they're no longer providing problems for web developers or end users. But it's intentionally set up to use a library of many smaller tests, and be paced as a marathon rather than a sprint, in the hope of avoiding some of the pitfalls of the Acid-test approach.
Personally I think the way web browsers work is kind of insane from a user perspective. "The Web" is obsessed with technical expertise and custom code. An application like MS PowerPoint (pick any other design tool you prefer) is designed for users to create multi-layered media content and display it anywhere, without requiring a college degree or months/years of experience to make something. I don't think people who actively work on the web have considered how over-complicated it all is. For an industry that talks obsessively about "innovation" and "disruption", it can't seem to conceive of a post-web-browser world.
Things like that should be prioritized the most. Once all of that is taken care of, browser vendors could start doing cycles of switching between focus on dev experience and user experience.
The MS PowerPoint user doesn't care about what the Windows application developers are talking about on Windows Hacker News, either.
Also, I think we pat ourselves too hard on the back when we go "surely all this stuff is way too complicated for people." Frankly, things are just becoming easier and easier.
how many units does CSS have?? Shouldnt part of the improvement be to simplify and declutter the web's fundamentals?
em
rem
ex
rex
cap
rcap
ch
rch
ic
ric
lh
rlh
vw
vh
vi
vb
vmin
vmax
And soon also:
dvh
lvh
svh
Taken from here
There are some where you can do that. Absolute lengths like mm, cm, inch etc could just be one unit. Same for deg, rad and turn. Mostly though, CSS units are very well thought out, and it's easy to understand why the length units are included (USA vs metric).
There's also units like Hz and so on.
According to this article, Safari doesn't yet have properly documented limits on storage.
Not sure about the localStorage issue. Are you referring to the fact that iPhones (and macs?) will automatically delete the localStorage for websites that haven't been visited in the past week?
It’s been fixed for a while, but the update mechanics definitely delayed the fix of the release; it was fixed in WebKit much earlier.