And the responsive version! π€©
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.dev
CSS stuff by Temani Afif
And the responsive version! π€©
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!
You can random all the sides as well.
And the responsive version! π€©
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!
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
And an easier background declaration in the near future thanks to border-area
A fun dive into creating random zig-zag dividers using random() inside clip-path by @css-only.dev - css-tip.com/zig-zag-divider/
Are we still debating whether CSS is a programming language or not? π
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.π
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! π
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.
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.
You are 10 versions behind on each browser π They are for Chrome 158+ and FF 161+
π‘ CSS Tip!
Tired of the classic rectangular grids? Let's random() the shapes!
Mosaic-style grids using modern features. A unique layout per page load.
Starting with simple grids; the responsive one comes next!
Yes, it's a CSS grid
Random() and Responsive! A cool demo in progress π
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.
π Confetti + Shapes + random(): A Fun Combination!
by @css-only.dev
at @frontendmasters.com
Wanna see something cool built with random()?
Check out my latest article π
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
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!