modern.css (@moderncss) header
modern.css (@moderncss) profile picture

Old CSS side by side with modern CSS. A side project by @naeemol

Audit your CSS →
Joined February 2026
Photo by modern.css (@moderncss)Photo by modern.css (@moderncss)Photo by modern.css (@moderncss)
Replying to @wesbos
oh boi
3
modern.css retweeted
I was pleased to find a technique for calculating when to shrink a Sidebar of Icons without magic numbers. It's basically: --limit: calc( /* figure out size of nav item */ * sibling-count()); --sidebar-h: 100cqb; @​container nav-item style(--sidebar-h < --limit) { .label { /* accessibly hide */ } }
5
8
157
6,505
モダンなCSSの書き方を学習したいならこれ 昔のCSSの書き方と今のCSSの書き方を、左右に並べて見比べられる「modern-css.com」がわかりやすい ・中央寄せは、position: absolute+transformの組み合わせ → display: grid; place-items: centerだけ ・フォームのエラー表示は、JavaScriptでクラスを付け外し → :user-invalidだけ ・アコーディオンは、JavaScriptで開け閉め → HTMLの<details>と<summary>だけ 9カテゴリで118以上の例があって、JavaScriptで書いてたものがHTMLとCSSだけで済むようになってる例がけっこう多くて驚く それぞれに「広く使える/最近使えるようになった/まだ一部だけ」のブラウザ対応状況が付いてるので、今すぐ使っていいかがその場でわかるのも親切 教材の内容も動くけど意外と古い書き方になってたりとかするから、こういうのを使って新しい書き方を把握しておくとよい
21
1
181
11,898
48 hours after launching 1.0, Modern Web Guidance is the #1 trending repo on GitHub 📈 Thank you to the thousands of web developers, and our partners across Firefox, MDN, Edge, and community contributors, who are helping move AI coding agents onto modern, accessible, Baseline-supported web primitives. If you haven't tried 1.0 on your codebase yet: Install the agent skills: 'npx modern-web-guidance@latest install' Audit an existing codebase: 'npx modern-web-guidance@latest legacy-scan .' Check out the repo on Github → goo.gle/4zoi7Dv
122
284
45
3,789
393,674
The new modern.css is live. • A CSS audit: give it your stylesheet or site, see what’s modern and what you can let go of • Baseline alerts: one short email when a CSS feature ships Free, sign in with Google or GitHub. modern-css.com/?utm_source=x…
1
1
2
96
modern.css retweeted
I'm a certified Flexbox Survivor: 3,010 points on the Modern CSS Quiz, 12 of 20 right. Can you beat it? modern-css.com/quiz/score/2q…
1
2
102
CSS小技✨ 画像の上にグラデーションを重ねる3つの方法💻 ① ::before(超定番) ② border-image + fill(モダン) ③ backgroundの複数指定(1行で完結) 実務で一番手軽でおすすめなのは③! CSS1行で疑似要素も不要なのは便利すぎます💡 みんなはどれ使ってる? #CSS #Web制作
5
44
2,432
💡 CSS Tip! Save this code for the future. It's another way to create that famous breakout effect. A strange code, right? Learn how it works 👇 css-tip.com/breakout-backgro… Until better support for border-shape, you will find another way using border-image.
1
7
1
91
18,817
modern.css retweeted
The LH unit in CSS is cool! In my new article, I wrote about it and shared my favorite demos. ishadeed.com/article/lh-unit…
8
46
2,789
modern.css retweeted
You can use pure CSS to truncate texts with ellipsis: .text-element { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30rem; } Make sure the text element or its parent have a width set for it to work:
3
3
21
2,069
modern.css retweeted
✍️ New Article: Rebuilding FIFA Standings Layout with CSS Subgrid I rebuilt FIFA’s standings layout with CSS Grid and subgrid. It starts with the layout problem, then moves into the final solution, with interactive examples along the way, as usual! ishadeed.com/article/fifa-la…
2
7
1
47
6,856
modern.css retweeted
progressively enhanced css scroll-driven parallax animation 👨‍🍳 3 columns use the same @​keyframes driven by container position + calc() to keep things responsive
8
17
261
15,320
CSS小技✨ CSS Gridの可変ルールを証明! 画面幅が縮むと 1️⃣min-content:最初から最小幅なので 左側は微動だにせず右(1fr)だけ縮む。 2️⃣fit-content:右が縮みきった後 自分も折り返して縮む。 後半は上限を150→50pxに絞って効果を証明🎶 動画で一発で分かります💻 #CSS #web制作
4
36
1,576
modern.css retweeted
if you’re dynamically masking a scroll container with css, consider leaving room for the scrollbar instead of masking it too 🧑‍🍳 mask-repeat: no-repeat; mask-size: calc(100% - 10px) 100px;
Scroll masking with CSS scroll animation as a progressive enhancement ⭐️ .scroller { animation: mask-up; animation-timeline: scroll(self); animation-range: 0 1rem; mask-composite: exclude; } @​keyframes mask-up { to { mask-size: 100% 120px, 100% 100%; } }
10
61
5
1,537
214,907
modern.css retweeted
In case you missed it, I wrote about the CSS round() function. ishadeed.com/article/css-rou…
✍️ New Article: Better fluid sizing with round() I wrote about how CSS round() enhances the values you get from clamp() in sizing, typography, and spacing. Why it matters, and how to use it. 🔗 ishadeed.com/article/css-rou…
4
42
4,351
modern.css retweeted
🤔 CSS is just styling, they said Meanwhile CSS with :where() and :has() to look like SQL queries
7
42
2,446
What we can do with modern CSS is impressive! 🤩 A cool demo is in progress. Stay tuned! 👀
9
10
139
12,211
CSS小技✨ 文章の最大幅にpxを使うな! レスポンシブ用に width: min(90%, ○○px)と 1行で書くモダンな設計思想💻 でも上限にpxを使うと、文字を大きくした時に 不自然な改行で大崩れする🤔 正解は【width: min(90%, ○○ch)】 文字の拡大に合わせて枠ごと広がる👍 #CSS #Web制作 #100DaysOfCode
1
13
1
125
7,748
Every site has a story to scroll 📖 With the new Scroll-Triggered Animations, you can transform your site into an immersive narrative that keeps your users engaged. Create beautiful time-based animations with zero JS, all natively in CSS. Break free from static UI and create your story in minutes. #GoogleIO
2
24
1
201
12,306