Style sheets only.
One workshop manual, dressed 24 ways. Then seventeen things people usually reach for JavaScript to do, done without it.
There is no script on this site: no <script> tag, no onclick, nothing to switch off. Every outfit and exhibit was designed by machine for the Slopwright.
The garden 24
Try them onThe same HTML document every time, byte for byte, except one stylesheet link. After the CSS Zen Garden, which had the idea first.
-
Workshop standard
Custom properties and grid
-
Under construction
steps() and tiled gradients
-
Level zero
Layered gradients
-
Sardine-tin sea
radial-gradient and border-radius
-
Green screen
ch units and text-shadow
-
Late edition
Multi-column layout
-
Gradients all the way down
Repeating conic gradients
-
Cut paper
clip-path
-
For the printer
@page and paged media
-
High contrast
forced-colors and prefers-contrast
-
No pictures
System colours, no images
-
Blueprint
Background grids and outlines
-
Load-bearing
Almost nothing
-
International style
Subgrid
-
Opening night
Gradients and text-shadow
-
Wound daily
@property and conic gradients
-
Night drive
3D transforms
-
Illuminated
::first-letter and text-wrap
-
After hours
color-scheme and light-dark()
-
Shelves
Container queries
-
Index cards
scroll-snap
-
Photocopied zine
Blend modes and transforms
-
Till receipt
Dotted leaders with flexbox
-
Sketchbook
Elliptical border-radius
Without JavaScript 17
Rule 110Tabs, a modal, a carousel, noughts and crosses with a referee, an adder and a cellular automaton that is, with your help, Turing complete. Each page shows the CSS that does it and says where the trick is worse for accessibility than a script would be.
-
Tabs, from radio buttons
Three tabs, three radio buttons, one sibling combinator.
:checked + ~ -
One drawer at a time
An exclusive accordion. The HTML does it; CSS dresses it.
<details name> -
A modal with no script
One with popover, one with :target. Only one of them is good.
popover:target -
A carousel on rails
Scroll-snap does the sliding; links or CSS-made dots do the picking.
scroll-snap::scroll-marker -
Tooltips that know where they are
Anchor positioning puts the tip by its word, and flips it at the edge.
anchor positioning:has() -
The big light
A dark mode switch: one checkbox and :root:has().
:has() -
A form that tells you off, politely
Errors that wait until you’ve had a go, with :user-invalid.
:user-invalid:has()CSS counters -
Keeping score
A checklist that counts itself with CSS counters.
CSS counters:has() -
A four-bit adder
Binary addition with carries, worked out by :has().
:has()CSS counters -
Reading progress
A progress bar whose clock is the scroll position.
scroll-driven animations@property -
Depth
Parallax from perspective alone. No scroll listener.
3D transforms -
Noughts and crosses
Two players, 81 checkboxes and a referee made of :has().
:has():checked + ~ -
The stockroom maze
Rooms are :target sections; exits are links.
:target:has() -
A clock that can’t tell the time
Hands and digits from @property integers. It starts at zero.
@propertyCSS counters -
A slideshow that plays itself
@keyframes for the playing; radio buttons for the picking.
:checked + ~:has() -
The lamp, drawn
One element, two pseudo-elements, a lot of gradients.
conic and radial gradients:checked + ~ -
Rule 110
A Turing-complete cellular automaton. You are the clock.
:checked + ~
CSS can’t loop and can’t keep a secret. It can do a surprising amount while you watch.
How honest is that