Modern CSS
moderncss.dev · Personal blog · on HN since 2020
Modern CSS is a tutorial site with articles on current CSS techniques, including layout, spacing, accessibility and feature support.
What HN saysHN commenters call it one of the best educational resources for modern CSS, praising its up-to-date, clear explanations and CodePen examples.
15HN people shared it
5linked it in comments
12stories submitted
264story points
9 months agolast shared
2020people per year2026
Most-shared posts
- 1Modern CSS Solutions4 people · 3 points · first shared 2020 · discussion on HN
- 2Modern CSS One-Line Upgrades2 people · 244 points · first shared 2024 · 29 comments on HN
- 3Modern CSS for Dynamic Component-Based Architecture2 people · 9 points · first shared 2023 · discussion on HN
- 4Contextual Spacing for Intrinsic Web Design1 people · 3 points · first shared 2022 · discussion on HN
- 5Container Query Units and Fluid Typography1 people · 1 points · first shared 2023 · discussion on HN
- 6How Custom CSS Property Values Are Computed1 people · 1 points · first shared 2023 · discussion on HN
- 7Modern CSS Upgrades to Improve Accessibility1 people · 1 points · first shared 2021 · discussion on HN
- 8Testing Feature Support for Modern CSS1 people · 1 points · first shared 2023 · discussion on HN
- 9Pure CSS Custom Styled Radio Buttons1 people · 1 points · first shared 2022 · discussion on HN
- 10Topics1 people · first shared 2025
- 113 popular website heroes created with css grid layout1 people · first shared 2022
- 12Providing type definitions for css with at property1 people · first shared 2024
What HN people wrote when they linked it
spiralx · 2021-10-27
This site which was posted here a while back is great, it's up to date and explains the concepts CSS is based on clearly with examples using Codepen so you get to see both the HTML and CSS as well as the result, plus you can open them in Codepen to edit them yourself. I've been doing CSS for close to a decade and learnt quite a few things from reading through it :)
https://web.dev/learn/css/
This site has a bunch of guides on how to use modern CSS to achieve particular tasks such as button and form control styling or particular layouts:
https://moderncss.dev/
demetris · 2026-02-16
I didn’t pay close attention to the domain and I thought it was the other one:
https://moderncss.dev/
One of the best educational resources for modern CSS.
BTW, one of the ways I love modern CSS is front-end performance. Among other things, it allows you to make smaller DOMs.
I talk about a modern CSS technique that does that here:
https://op111.net/posts/2023/08/lean-html-markup-with-modern-css/
It is an idea I started playing with when custom properties landed in browsers, around 2016 or 2017? Around 2021 I started using the technique in client sites too.
Now I want to write a 2026 version of the post that talks about container queries too. The technique becomes more powerful if you can rely on container queries and on the cqw unit. (You cannot always. That stuff is still new.)
For an example of the convenience cqw offers if you can rely on it, see the snippets I have in this:
https://omnicarousel.dev/docs/css-tips-know-your-width/
nraf · 2024-09-04
As someone who really enjoys working with CSS, but also working with colleagues who struggle with it, I strongly recommend Kevin Powell’s YouTube channel.
He has touched on exact feature a few times, here’s a video he uploaded a week ago that shows one useful feature that registered properties enables: https://youtu.be/U8NykwZNbGs
There’s also this article that breaks down registered properties with an easy-to-follow example: https://moderncss.dev/providing-type-definitions-for-css-with-at-prope…
ZYbCRq22HbJ2y7 · 2025-08-29
There are a number of sites that aggregate some things, here is one
https://moderncss.dev/topics/
Recent survey of what people use to learn CSS:
https://2025.stateofcss.com/en-US/resources/
CSS Tricks article on this:
https://css-tricks.com/how-to-keep-up-with-new-css-features/
qbasic_forever · 2022-02-10
Grid is really nice: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout
People are finding all sorts of fun things to do with it: https://web.dev/one-line-layouts/ and https://moderncss.dev/3-popular-website-heroes-created-with-css-grid-l…