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

  1. 1
    Modern CSS Solutions
    4 people · 3 points · first shared 2020 · discussion on HN
  2. 2
    Modern CSS One-Line Upgrades
    2 people · 244 points · first shared 2024 · 29 comments on HN
  3. 3
    Modern CSS for Dynamic Component-Based Architecture
    2 people · 9 points · first shared 2023 · discussion on HN
  4. 4
    Contextual Spacing for Intrinsic Web Design
    1 people · 3 points · first shared 2022 · discussion on HN
  5. 5
    Container Query Units and Fluid Typography
    1 people · 1 points · first shared 2023 · discussion on HN
  6. 6
    How Custom CSS Property Values Are Computed
    1 people · 1 points · first shared 2023 · discussion on HN
  7. 7
    Modern CSS Upgrades to Improve Accessibility
    1 people · 1 points · first shared 2021 · discussion on HN
  8. 8
    Testing Feature Support for Modern CSS
    1 people · 1 points · first shared 2023 · discussion on HN
  9. 9
    Pure CSS Custom Styled Radio Buttons
    1 people · 1 points · first shared 2022 · discussion on HN
  10. 10
    Topics
    1 people · first shared 2025
  11. 11
  12. 12

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/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close