Re:New.css – A classless CSS framework to write modern websi...
by _bxg1 on Monday May 18, 2020 @11:00AM
(#23223179)
As suggested by a sibling comment the key isn't to prevent horizontal scrolling, but to prevent content from overflowing a single screen width. Which isn't hard per se but doesn't have a one-size-fits-all solution.
[ Parent
| on HN ]
Re:New.css – A classless CSS framework to write modern websi...
by chongli on Monday May 18, 2020 @11:18AM
(#23223385)
So many websites overflow a single screen width by a trivial amount. This is just enough to cause accidental horizontal scrolling which disrupts the flow of scrolling the page. Very frustrating!
Re:New.css – A classless CSS framework to write modern websi...
by _bxg1 on Monday May 18, 2020 @11:22AM
(#23223461)
Yep. The offenders are usually really long un-line-breakable words, images, or videos. In this case we have:
href="https://newcss.net/theme/terminal.css">
Which is not being allowed to break to a new line because it doesn't contain whitespace. A CSS rule can be used to allow it to break, though that can also have other, unwanted ramifications.
Re:New.css – A classless CSS framework to write modern websi...
by thaumaturgy on Monday May 18, 2020 @12:25PM
(#23224517)
It's not super easy either. I ran into this also (https://doc.sscaffold-css.com/ysk/tables/) and the root cause is that the <table> element is not considered to be either a block-level or an inline element. It's special, and because it's special, some browsers support setting max-width on it and some don't. So tables need a container element or some other kind of special handling. It's an easy bug to overlook because the cause is so unexpected.