Accounting for scrollbar appearance and auto-updtating the width of the frame/window is pretty useful, though. Not having the horizontal scroll bar suddenly appear when a vertical bar is needed due to dynamic elements is highly preferable.
Modern CSS Code Snippets: Stop writing CSS like it's 2015
221–230 of 318 posts
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#222CSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
Are we still complaining about Tailwind? This ship has sailed. The world is so much better than the old BEM/LESS hell, it is wonderful. UnoCSS is even greater in empowering frontend developers.
Non-BEM CSS with ids and multi-classes everywhere was hell.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#223Earlier quoted context omitted.
Is the Controller not in a coupled pair with a View? We could imagine an interface where it could be completely separate (e.g. a kiosk TUI where stuff like "press 'r' for X" is displayed), but in the vast majority of UIs the View has state, and the Controller has to depend on that state (e.g. did this keypress happen with a text field focused). Sure, this is abstracted away via the UI framework and we operate on usua…
You can have decoupled Controllers from Views using React. That's the basis of the "original" Flux/Redux architecture used by React developers 10+ years ago when React was just beginning to get traction. A flux/redux "Store" acts as a Model -> contains all the global state and exactly decides what gets rendered. A flux/redux "Dispatcher" acts as a Controller. And React "Components" (views) get their props from the "S…
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#224Live demo for input:user-invalid does not work on my phone. It'd always been the same: those ugly patches of JavaScript were being added to maintain compatibility with all the browsers... That's why the newest CSS tricks were always out of reach for us
yeah, it doesn't work on desktop Firefox or desktop Chrome-based browser either. That one is a dud. Most others work for me, though.
explicit border:2px solid var(--border); on the input which takes priority over the class :
.demo-uv-input:user-invalid { border-color: var(--red-muted); background: rgba(239,68,68,.04); }
YMMV but when corrected it works for me on latest Edge, Chrome, Firefox (Windows versions)
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#225https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/V...
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#226Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#227Earlier quoted context omitted.
The deadest horse in web development is the myth of “separation of concerns”
I don't use Tailwind, it's a solution to a problem I don't have. I can understand how it might be useful for certain types of web development, e.g. landing pages where the content and styles are tightly coupled. So as a technology, it's OK. But my god its userbase is toxic and obnoxious.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#228Earlier quoted context omitted.
Tbh there's nothing really wrong with that. You don't need stuff like article or section if you set the right attributes. Often easier to just use divs to get the structure right, and figure out the meaning later.
Exactly this. I wonder if the people downvoted you realize that HN is basically just a big table and a bunch of div, and they use this very site just fine?
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#229CSS in 2025: Let's write html inlined styles as if it was 2005 and separation of formatting/representation was never invented. I talk of tailwind, of course.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#230Earlier quoted context omitted.
In the past this was a major issue that meant useful features were only ever usable after IE/Safari finally supported them half a decade later, but it has seriously gotten better. Sadly as a result of Chromium's overbearing presence, but it's a helpful outcome at least. https://wpt.fyi/interop-2025
Problem with safari though is that it’s tied to OS updates that many people just defer for insanely long periods of time. So unlike the other browsers, it’s not evergreen, so if you need to support any iOS users or Mac users who don’t use chrome etc, you’re out of luck
Saying that, MacOS and iOS generally (up until recently, from what I've heard) have very good uptake rates for major updates. It's become less awful standards-wise as time has gone on in my experience at least.