Buy why do in native HTML when we have all these bloaded frameworks available?
/s
Buy why do in native HTML when we have all these bloaded frameworks available?
/s
Thats definitely a better argument than most of the ones I read, which were always about overly complicated JavaScript setups for switching a million variables for light-dark support, instead of just using the CSS stuff.
Literally the only thing I can understand needing Javascript for is a persistent bit on the toggle so it doesn't constantly change.
It's likely a small difference, but the main advantage of having it in the HTML is that it's immediately available, so you don't have to deal with the flash of unstyled content being in the wrong color scheme.
Source: https://css-tricks.com/almanac/properties/c/color-scheme/#theres-a-corresponding-meta-tag-too
Aww sweet!
I love it when a site has a loading screen and takes 20s (I counted) to load, and 3-5 second for every interaction you make.
You scroll and you are in the warm embrace of laggy scroll animations. Animations that make no sense, serve no purpose. You just let it flow through you and your device resources.
I even has music! I just open this website on my way to work. Bye bye to the 80GB of music I have on my phone.
Peak web design. Peak innovation. Such web. Wow.
A blog that advocates for the use of tri-state dark mode toggles ironically fails to implement this feature themselves. The article's default setting is a blindingly white background, contradicting its own argument.
Overall interesting read and I agree tri-state is nice but I couldn't get past this.
As someone less experienced but currently learning HTML, if you are trying to do the bare minimum of JavaScript, is there a point in having it in the HTML vs the CSS?
Please add / You really should add <meta name="color-scheme" content="light dark" />, ref
As an aside; my dark reader dark inject breaks the website layout on that website. I've never seen that on any other website.
God awful AI writing
Surely this should be purple?
Sounds like the aftermath of an alleycat breeding fight. 🤢
I like that the X button leads to Bluesky.
Both esoteric and useful. Thank you.
Great write!
I'm leaning very heavy on Hypermedia architecture. It's the way of past, current and future!
And this article opened up my view to otger ecosystems and how they support this (I have been doing it with Clojure+HTMX).
Doesn’t HTMx basically do this already?
Edit: ah, it’s a comparison of using HTTP (like HTMx) and using WebSockets.
Good article. It describes things in painstaking detail, and gets to the bottom of causes, possible choices, and so on.
I couldn't shake the feeling of AI writing in places, but that's not to the discount the article's value.
Overall, I love the quality this community upholds (from my casual experience).
Awesome piece
naaaaaaaaaah
yeah fuck those people!
if they had any sense they'd fix their broken ass eyes.
/s
I too hate visually impaired people.
I always really enjoy articles by this author, and I always randomly stumble across them. Thanks for sharing this and helping me randomly stumble across yet another.
Oh man, I thought "Canvas" was the name of yet another web framework, but no, they mean the actual HTML <canvas/> element.
Back in university, I was tasked to build a calendar view with HTML. It was my first web project, I decided to use a canvas to draw the calendar.
It took me several times as long to complete my implementation compared to other students, because I had to re-implement layouting, click handlers and probably more things I don't remember...
No.
What you most probably want to do is to build your next app as simple as possible, with hypermedia driven architecture, using established patterns of rendering server side, sending html to client, client replaces HTML.
HTMX is one tool that complements and fits nicely within this well established paradigm, which is the way I'm doing web development going forward.
My shorter answer: if you think you need to use canvas,
you don't.
(Unless you're literally building a drawing app.)
99.99% of web applications would be better off virtually ignoring "best practices" introduced by Big Tech.
Wrap it in a useLayoutEffect
google and reddit, openai are all joined at the hip. most of the training data comes from them, plus scraping WIKIPEDIA TOO.