
Old CSS side by side with modern CSS. A side project by @naeemol
Audit your CSS →
Joined February 2026
- Tweets83
- Following42
- Followers68
- Likes125
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 */ }
}
modern.css retweeted
モダンな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だけで済むようになってる例がけっこう多くて驚く
それぞれに「広く使える/最近使えるようになった/まだ一部だけ」のブラウザ対応状況が付いてるので、今すぐ使っていいかがその場でわかるのも親切
教材の内容も動くけど意外と古い書き方になってたりとかするから、こういうのを使って新しい書き方を把握しておくとよい
modern.css retweeted
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
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…
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…
modern.css retweeted
💡 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.
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…
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:
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…
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
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;
CSS isolation: Prevent z-index Overflow
modern-css.com/z-index-isola…
1
41
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…
modern.css retweeted
🤔 CSS is just styling, they said
Meanwhile CSS with :where() and :has() to look like SQL queries
modern.css retweeted
What we can do with modern CSS is impressive! 🤩
A cool demo is in progress. Stay tuned! 👀
modern.css retweeted
CSS小技✨
文章の最大幅にpxを使うな!
レスポンシブ用に width: min(90%, ○○px)と
1行で書くモダンな設計思想💻
でも上限にpxを使うと、文字を大きくした時に
不自然な改行で大崩れする🤔
正解は【width: min(90%, ○○ch)】
文字の拡大に合わせて枠ごと広がる👍
#CSS #Web制作 #100DaysOfCode
modern.css retweeted
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























