Defensive CSS
ishadeed.com
ishadeed.com
https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-g...
Perhaps the best solution there would be some way of designating a certain scrollable area as the document scrollable area when the body element doesn’t have scrollbars, so that Up/Down/PageUp/PageDown/Space/Shift+Space all act as though it were focused when the body is focused. That way, you could have the modal exist in the DOM after the main scrolling area, rather than inside it, and you wouldn’t need to worry about document scrollbars or overscroll behaviour. Multi-pane views (very common in desktop apps) are normally a bit of a mess on the web, and it’s always a pain when you come across a web page that has shunned the body scrollable area and put everything in something like a <main style="overflow:auto">, so that you have to focus that before keyboard scrolling works.
I should finish my draft blog post from a year or two ago where I explored the space and all the hoops you have to jump through to have it work almost perfectly, though it still requires some client-side JavaScript to redirect body focus to the correct element.
This can already be avoided by layering things right and not removing the scrollbar.
Expecting your website to be identitical across every browser is not the goal. You need to build sites that respond to the capabilities of the user's device, and progressively enhance to get better as more features become available. If the website is less wide to account for the scrollbar on browsers where it can be that's awesome, and if it's full width on browsers that don't have the gutter feature that's OK too.
Critical functionality should work everywhere. Then users should get the best experience possible that their browser supports on top of that.
Should I record a video about the issue?
As it is a property to reduce visual artifacts (as content length changes) it is a safe one to specify and have ignored where not supported: users of other browsers will just not get that minor benefit until the browser catches up. This may be a problem if you are trying to achieve perfectly identical presentation to all users, but you've got a lot of problems coming your way too if that is one of your goals!
A browser not supporting this property of you user it is not going to break a design, not to the point of causing functionality or usability issues, unless you are doing something very strange and complex.
<div class="display-flex-wrap">
<div class="display-flex-wrap">
<div>one</div>
<div>two</div>
</div>
<div class="display-flex-wrap">
<div>three</div>
<div>four</div>
</div>
</div>
That kind of assumes all the inner div's are the same width too; I'm not sure if your question necessarily does or not.If it's possible to do something more sophisticated and clever with flexbox I don't know... but maybe with grid? I don't have my head completely wrapped around grid, but currently i naively believe it can literally do anything.
Oh, wait. https://thenewstack.io/google-docs-switches-to-canvas-render...
Certainly there are odd parts to CSS that are due to it originally being only intended for relatively static content, but when you try and create a layout system from scratch you keep running into issues that the CSS people have spent years figuring out already.
Take Figma's layout system for example. They built their own from scratch to keep it simple and straightforward and yet I can't create half of the layouts I need to in Figma that are pretty simple to do in CSS. All the top requested features on the Figma forum are to recreate HTML and CSS behavior and often coming from designers who don't actually know HTML/CSS, indicating these are universal layout requirements, not just something developers are demanding.
The author has lots of other solid content on his page. I've now gotten to the stage where I can learn so much from people with half my experience in years.
(not asking rhetorically just wanna know if I still have to worry about all this after using Bootstrap)
I knew about a number of these tricks, beforehand, but a lot are new to me.
Thanks!
When creating a website I start with text first, and bolt on CSS where it's needed, but having a site which is primarily text would be an interesting experiment to run.
Edit: I know having text-only would mean not having hyperlinks, but you could keep everything on one page, and link out to articles via the usual channels (social media, etc)