#CssSubgrid

Ana Tudor 🐯anatudor
2026-01-29

The tiny details make the difference - check out those roundings in the cards demo!

Even cooler: the shape depends on the size of the sibling it wraps around, no magic numbers. If we need the shape to grow (for ex if we want it to have more content), there's no need to change any clip-path or mask.

Screenshot highlighting the card corner roundings around their round and pill-shaped siblings.Zoom into one of the details.Zoom into another.
Ana Tudor 🐯anatudor
2026-01-29

My most hearted @codepen demos of '26:

✨ Pure animated carousel codepen.io/thebabydino/pen/dPX

✨ Scatter & CSS gradient codepen.io/thebabydino/pen/zxB

✨ Cards with concave rounding on irregular grid codepen.io/thebabydino/pen/Wbx

First two need very little code and are heavily commented.

Screenshot of animated 3D carousel, where the items are placed on the inside of a cylinder approximation.Screenshot of light blue to dark blue top to bottom gradient with a pixelated grain.Screenshot showing cards smoothly wrapping around circular/ pill shaped elements.
Ana Tudor 🐯anatudor
2026-01-05

Wake up, wake up, wake up!

If you're a Cheetah+ supporter on Ko-fi or Patreon, then first of all thank you πŸ™ and second, I've just published a massive post about an improved technique for flexible irregular shapes.

❇️ ko-fi.com/post/New-year-new-te

❇️ patreon.com/posts/new-year-new

A square image with cutouts depending on the dimensions of corner elements, dimensions that in turn depend on how the text in those corner elements reflows at different viewports.Stepped shape with rounded corners on the right, step height depending on the height of the elements on the left, whose height is given by their content and how it wraps at different viewports.Irregular shaped image with both convex & concave roundings. Shape depends on the dimensions and aspect ratio of other elements, how they scale/ wrap as the viewport changes.Three cards wrap around buttons of different sizes in the bottom right corner. All corners of the card shapes, whether convex or concave, are rounded.
Ana Tudor 🐯anatudor
2026-01-04

Super simple 🦌 profile cards, content aligned with subgrid - all essential layout in just 6 declarations!

Check it out on @codepen codepen.io/thebabydino/pen/gbM

Demo screenshot with DevTools grid overlays on top.
N-gated Hacker Newsngate
2025-11-26

πŸš€ Wow, get ready to revolutionize your layouts with CSS Subgrid! πŸŽ‰ Because who doesn't want to juggle more grid syntax while praying for browser support? πŸ™„ Dive into the thrilling peril of 'nested grid numbers' and 'subgrid gotchas'β€”sounds like a fun Saturday night, right? πŸ˜‚
joshwcomeau.com/css/subgrid/

Inautiloinautilo
2025-11-25


Brand new layouts with CSS subgrid Β· β€œSubgrid unlocks exciting new layout possibilities.” ilo.im/168p12

_____

Inautiloinautilo
2025-11-18


Building a multi-stage timetable Β· How modern CSS powers a cutting-edge layout ilo.im/168i5y

_____

Ana Tudor 🐯anatudor
2025-11-03

Concave rounding header. Shape on the right depends on content on the left. Real transparency. Using subgrid and filters.

Live demo on @codepen codepen.io/thebabydino/pen/mdN

How would you do this? Try to think about it before checking my solution!

Screenshot. Shows a page with a header having on the right and image shaped in steps depending on the size of the content on the left. The steps are rounded at both the convex and concave corners.
Ana Tudor 🐯anatudor
2025-10-30

Real transparency behind text/ around scrollable image. Shape with both convex and concave roundings changes as the text reflows. No JS, text isn't split into a span per line.

Can you figure out how to do this before checking out my solution? reddit.com/r/css/comments/1ojp

Live on @codepen codepen.io/thebabydino/pen/wBM

Inautiloinautilo
2025-10-27


Tabs with β€˜details’, grid, and subgrid Β· A modern HTML/CSS approach using no hacks ilo.im/167ye4

_____

Inautiloinautilo
2025-09-04


Untangling nested interactive elements Β· How CSS subgrid helps solve a common issue ilo.im/166j78

_____

Inautiloinautilo
2025-07-17


Enhancement of a simple layout Β· Smarter layout flow using CSS subgrid ilo.im/165g9x

_____

Ana Tudor 🐯anatudor
2025-01-03

Saw youtube.com/watch?v=An3QMWg3m1c linked last evening & gave the challenge a quick go myself.

My approach was a mostly one, with minimal HTML (no extra wrappers) and JS (used only to update top item index, ~200 bytes minified).

While it was working, it wasn't pretty, so today I polished the demo & heavily commented the CSS - check it out on @codepen: codepen.io/thebabydino/pen/jEN

Ana Tudor 🐯anatudor
2024-08-28

We add a `.shape` element which in also covers all of the 4 cells of its parent's grid and also inherits its `.back` parent grid via `subgrid`.

This element creates our shape via two pseudos positioned in the 1st grid cell (clipped) and across the 2nd column (avoiding heading).

Ana Tudor 🐯anatudor
2024-08-28

We create a 2Γ—2 header grid with the height of the 2nd row and the width of the 1st column given by the dimensions of the element (the heading) in the cell where they meet.

We also have another `.back` element covering all 4 grid cells & inheriting parent grid via `subgrid`.

2Γ—2 grid on header.

`.back` stretches across all grid cells & inherits this grid.

Heading just in bottom left cell.

Screenshot showing the grids highlighted via DevTools. The width of the first column is given by the amount of text content inside the heading.
Inautiloinautilo
2024-04-03


How to align column rows with CSS subgrid Β· Aligning content of boxes that sit side by side ilo.im/15ydwz

_____

Ana Tudor 🐯anatudor
2024-02-23

If you're a $5+ patron on Patreon, I've just posted a very special and cool interactive demo. With explanations about the concepts it illustrates + the demo itself is heavily commented as the viewport-adaptive layout part is very interesting too.

patreon.com/posts/swap-channel

Inautiloinautilo
2023-09-29


CSS Subgrid Β· Introduction, use cases, examples, and resources ilo.im/15a4kz

_____

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst