Grilled Cheese

ExploreLog inSign up

CSS by T. Afif

@css-only.dev

95 Following6.9k Followers

CSS stuff by Temani Afif

PostsRepliesMedia
@css-only.devDec 3, 2026, 11:33 AMReposted by @css-only.dev

And the responsive version! 🀩

css-tip.com/mosaic-grid/

Random but organized! Works with any number of elements, and everything adjusts perfectly based on the container size.

Powered by random(), ident(), sibling-*(), border-shape, etc. All the cool stuff!

CCSS by T. Afif@css-only.devNov 30, 2026, 1:56 PM

πŸ’‘ CSS Tip! Tired of the classic rectangular grids? Let's random() the shapes! css-tip.com/random-grid/ Mosaic-style grids using modern features. A unique layout per page load. Starting with simple grids; the responsive one comes next!

Grid of images with irregular shapes
@css-only.devDec 3, 2026, 7:56 PM

You can random all the sides as well.

CCSS by T. Afif@css-only.devDec 3, 2026, 11:33 AM

And the responsive version! 🀩 css-tip.com/mosaic-grid/ Random but organized! Works with any number of elements, and everything adjusts perfectly based on the container size. Powered by random(), ident(), sibling-*(), border-shape, etc. All the cool stuff!

@css-only.devDec 3, 2026, 11:33 AM

And the responsive version! 🀩

css-tip.com/mosaic-grid/

Random but organized! Works with any number of elements, and everything adjusts perfectly based on the container size.

Powered by random(), ident(), sibling-*(), border-shape, etc. All the cool stuff!

CCSS by T. Afif@css-only.devNov 30, 2026, 1:56 PM

πŸ’‘ CSS Tip! Tired of the classic rectangular grids? Let's random() the shapes! css-tip.com/random-grid/ Mosaic-style grids using modern features. A unique layout per page load. Starting with simple grids; the responsive one comes next!

Grid of images with irregular shapes
@css-only.devDec 3, 2026, 11:15 AM

Chrome support both: codepen.io/t_afif/pen/e...

As for the comma, it's to have two layers so that the border-area applies only to the first one (the gradient). Without the comma, it becomes one layer (called <final-bg-layer>) and border-area applies to both

Photo, no description
@css-only.devDec 3, 2026, 9:19 AM

And an easier background declaration in the near future thanks to border-area

Photo, no description
@kevinpowell.coDec 2, 2026, 6:35 PMReposted by @css-only.dev

A fun dive into creating random zig-zag dividers using random() inside clip-path by @css-only.dev - css-tip.com/zig-zag-divider/

css-tip.comRandom Zig-Zag DividersAnother fancy shape made possible using random()
@css-only.devDec 1, 2026, 8:47 PM

Are we still debating whether CSS is a programming language or not? πŸ˜†

LAgustin Capeletto@lowpoly.ggDec 1, 2026, 5:42 PM

Play Windows Solitaire (1990) in pure #CSS. This uses random(), view timelines, bitpacking, and no JavaScript! πŸƒ Try it: codepen.io/editor/alowp...

@stefanjudis.comNov 30, 2026, 10:18 PMReposted by @css-only.dev

This week's Web Weekly is just about to hit all the inboxes.

If you care about web and what happens in browser land, you should check it out.πŸ‘‡

webweekly.email/archive/web-...

Web Weekly 204

js: Temporal's `weekOfYear` weirdness
node: Signals on `http.IncomingMessage`
firefox: Firefox 161 is out!
css: Fun with `random()`
css: `@mixin` is being worked on?
baseline-new: Pseudo-classes on media elements
@css-only.devNov 30, 2026, 7:45 PM

Can the random configuration give me a uniform rectangular grid? The probability is low, but getting a new layout on each reload is satisfying and addictive! πŸ˜†

CCSS by T. Afif@css-only.devNov 30, 2026, 1:56 PM

πŸ’‘ CSS Tip! Tired of the classic rectangular grids? Let's random() the shapes! css-tip.com/random-grid/ Mosaic-style grids using modern features. A unique layout per page load. Starting with simple grids; the responsive one comes next!

Grid of images with irregular shapes
@css-only.devNov 30, 2026, 3:42 PM

I guess students deserve to see the cool stuff (I don't want them to hate me πŸ˜…) Added some fallback, but not sure if it will work fine. It may fail because of other unsupported features.

@css-only.devNov 30, 2026, 2:52 PM

I guess if you replace all the random() instance with fixed values (you randomly pick) you should see something (I hope so). I will try to add a fallback to replace random() for older browsers.

@css-only.devNov 30, 2026, 2:42 PM

You are 10 versions behind on each browser πŸ‘€ They are for Chrome 158+ and FF 161+

@css-only.devNov 30, 2026, 1:56 PM

πŸ’‘ CSS Tip!

Tired of the classic rectangular grids? Let's random() the shapes!

css-tip.com/random-grid/

Mosaic-style grids using modern features. A unique layout per page load.

Starting with simple grids; the responsive one comes next!

Grid of images with irregular shapes
CCSS by T. Afif@css-only.devNov 28, 2026, 3:36 PM

Random() and Responsive! A cool demo in progress πŸ‘€

@css-only.devNov 28, 2026, 8:36 PM

Yes, it's a CSS grid

@css-only.devNov 28, 2026, 3:36 PM

Random() and Responsive! A cool demo in progress πŸ‘€

@frontendmasters.comNov 28, 2026, 8:39 AMReposted by @css-only.dev

Confetti + Shapes + random(): A Fun Combination! Mix the new random() function with offset-path shapes, sibling-index(), and sibling-count() to build CSS-only confetti explosions, full or partial, that burst on hover.

blog.master.devConfetti + Shapes + random(): A Fun Combination!Mix the new random() function with offset-path shapes, sibling-index(), and sibling-count() to build CSS-only confetti explosions, full or partial, that burst on hover.
@pablolarah.bsky.socialNov 27, 2026, 8:45 PMReposted by @css-only.dev

🎊 Confetti + Shapes + random(): A Fun Combination!
by @css-only.dev
at @frontendmasters.com

#css #webdev #random
blog.master.dev/confetti-sha...

@css-only.devNov 27, 2026, 4:21 PM

Wanna see something cool built with random()?

Check out my latest article πŸ‘‡

blog.master.dev/confetti-sha...

CCSS by T. Afif@css-only.devOct 28, 2026, 11:29 AM

πŸ’‘ CSS Tip! random() + shape() + confetti = fancy shape explosion πŸŽ‰ css-tip.com/shape-confet... A CSS-only fun (and useless) demo powered by modern features.

@web-standards.devNov 27, 2026, 11:00 AMReposted by @css-only.dev

Creating diagrams and graphs using modern CSS. @css-only.dev continues the series on connecting elements with lines using border-shape, shape(), anchor positioning, and if(), from simple links to zig-zag and spring connectors. #css #anchor

blog.master.dev/crea...

Title β€œCreating Diagrams and Graphs Using Modern CSS” with four blocks labeled A, B, C, and D connected in a loop by curved lines.
@stefanjudis.comNov 26, 2026, 10:45 AMReposted by @css-only.dev

As usual, I've no idea how Temani does it, but this is a CSS-only `input` of type `range`, an `output` element, and a label. I've got no words!

https://css-tip.com/shap...

A range slider that's shaped as a curve. It includes a label that tilts left and right depending on the position of the curve.
Older posts
Terms of UsePrivacy PolicyCommunity StandardsHelpGet the app

Grilled Cheese is a product of Village Compute

Version devBuilt at: 2026-12-03 22:42:33 EST