Josh W. Comeau, a front-end developer and educator, writes interactive tutorials on CSS, React and web accessibility.
HN commenters recommend it as excellent for front-end developers and praise his comprehensive CSS course as pricey but worthwhile.
Love this. I especially liked shape based reflow example.
This is something I've been thinking for ages and would love to add to Ensō (enso.sonnet.io), purely because it would allow me to apply better caret transitions between the lines of text.
(I'm not gonna do that because I'm trying to keep it simple, but it's a strong temptation)
Now a CSS tangent: regarding the accordion example from the site (https://chenglou.me/pretext/accordion), this can be solved with pure CSS (and then perhaps a JS fallback) using the `interpolate-size` property.
https://www.joshwcomeau.com/snippets/html/interpolate-size/
Regarding the text bubbles problem (https://chenglou.me/pretext/bubbles), you can use `text-wrap: balance | pretty` to achieve the same result.
(`balance` IIRC evens out the # of lines)
I largely agree with this article, and while CSS is pretty hacky due to having to keep up with backward compatibility since the earliest implementation, modern CSS is pretty good for laying out designs.
I recommend Josh W Comeau's CSS for JS devs [0]. If you've seen his other articles on CSS and on web dev in general [1], you know that he's a great teacher of complex topics.
The course is priced for corporations to buy via their employee development budget, which is how I took it, so for individuals it is steep, but if you can convince your employer to pay, I don't think there's a better CSS course out there.
[0] https://css-for-js.dev/
[1] https://www.joshwcomeau.com/
I'm a sucker for good little microinteractions. The author's checkbox may not be one of those, as it seems a bit overdone, but I'd have to try it to be sure. It's easy to go too far.
But, some other examples that I love:
• https://www.joshwcomeau.com/animation/3d-button The red "push me" button is great, but also check out the sun/moon icon near the top right!
• https://www.jam3.com/#contact The hover states on the buttons.
• https://citymapper.com The top-left hamburger icon.
(I also happen to be quite proud of the hover states on my own site: https://jonathanalland.com/)
Making this type of stuff is definitely what I miss most about working in web design.
EDIT:
Paste this hacky snippet into your browser's console to save all of the links into your clipboard:
(() =>
{
let result = [...document.querySelectorAll('td a')]
.map((link) =>
link &&
!link.href.includes('ycombinator') &&
!link.href.includes('javascript:void')
? link.href
: ''
)
.filter(Boolean);
result = [...new Set(result)];
result.sort();
copy(result.join('\n\n'));
})();
Just to help, here's a compiled-list of all of the links shared here so…
I personally enjoy any sort of interactivity in tech articles. Things like sliders, inputs and buttons are great at keeping attention and can help make the subject easier to understand or illustrate things that can't easily be described in text.
Some examples:
https://liveblocks.io/blog/how-to-animate-multiplayer-cursors
https://www.joshwcomeau.com/css/interactive-guide-to-flexbox
https://ciechanow.ski/bicycle/
Although it's all very content dependent of course - FE development tends to lend itself a bit better to this sort of format.
Hey Josh, I'm eagerly anticipating your React course, could provide any hints on when it'll be ready for release :)
I love your approach of breaking down complex concepts into their fundamental components and then reassemble them from the ground up! Many tutorials rely on reasoning by analogy, but I find your approach helps the reader build a mental model to think about the problem on their own.
Your interactive guide to flex box is a great example of this:
https://www.joshwcomeau.com/css/interactive-guide-to-flexbox/