Deep Dive · CSS

Rethinking CSS: What You Can Do in 2026 Without JavaScript

Dylan Beattie's argument is not that CSS is beautiful — it is that the CSS you formed an opinion about ten years ago no longer exists. Accordions, animated drawers, customisable dropdowns, procedural colour systems and animated custom properties: all built from semantic HTML and CSS, without a framework, and degrading gracefully where support has not arrived.

Do It With Style: Rethinking CSS — talk thumbnail
Talk: Dylan Beattie, NDC Oslo 2026 1:00:27 3 November 2026
Modern CSS OKLCH details/summary no JavaScript

🎯 The premise 0:10

The talk opens by conceding every legitimate complaint: CSS is not a language you can build software with on its own, most CSS in the world is terrible, and you cannot opt out — you can avoid Java or relational databases for an entire career, but anything on the web goes through CSS.

"CSS is kind of something that you looked at 10 years ago, didn't like it, decided it sucked, and that's just how you live now for the rest of your career. But CSS is constantly evolving."
The diagnosis of why CSS projects rot is the sharpest part of the opening. Someone changes something, it breaks something they had no idea could be affected, they become afraid of the file, so they stop editing and start appending. You end up with fifteen ways to make a button look right — and then a sixteenth, added on a Friday afternoon because you want to go home. Maintenance fear, not ignorance, is what produces the mess.

He adds the 2026 corollary: that accumulated mess is what language models were trained on, which is one reason CSS remains a weak spot for them.

🧱 Why CSS is uniquely stuck 4:00

Property of CSSConsequence
Baked into browsers, not installedThere is no version to upgrade; billions of users depend on the browser continuing to work
Mistakes are permanentOnce shipped, a misleading default stays — the CSS Working Group keeps a wiki of things they would change with a time machine
Backwards compatibility is sacredNew behaviour has to be opt-in, even when the old behaviour was a bug
The web was supposed to be presentation-freeThe founding principle was that publishers control structure and readers control rendering — which is why styling was bolted on later, awkwardly

He traces the 1994 mailing list where everyone building websites was on one list, and someone asked whether an extra blank line in Mosaic was a bug — and got back: "It's not a bug. It's a rendering choice made by the browser. What can you do about it? Probably nothing."

That history explains a present-day annoyance: every modern CSS feature arrives as an opt-in — a new property, an @supports block, a keyword that says "yes, really, animate this". It looks like over-engineering until you learn that the alternative was breaking Stack Overflow, UPS and Alibaba Cloud (see the height-animation story below).

🔁 The fashion cycle 9:20

The border-radius origin story is the best explanation of how web standards actually happen. It used to cost real money: his first agency charged £15 per button, because Paul had to draw each one in Photoshop. Then someone worked out nine-slice scaling with tables and a wrapper, and the money tree died within a month.

StageWhat happens
1You see a site and ask "how did they do that?"
2People reverse-engineer it and write blog posts
3Snippets, plugins, an npm package, a React component
4Browsers implement it natively
5It is boring, and the cycle restarts with something else

Current occupant of stage one to three: liquid glass. His prediction is a schedule — blog posts in a month, a React plugin in a couple of months, native in browsers this time next year, boring shortly after.

And the Microsoft chapter is the cautionary one: Apple, Google and Mozilla shipped border-radius; Microsoft refused, then shipped an entire operating system without rounded corners to prove the point, then eventually caved. When a vendor decides a user preference is a fad, the users wait years for something trivial.

🏛 The three pillars shift 11:35

The web has always been structure (semantic HTML), presentation (CSS) and behaviour (JavaScript). The interesting movement is that things we filed under behaviour turn out to be presentation.

Looks like behaviourActually is presentation
A password field that shakes when you get it wrongMotion triggered by interaction — a usability concern, not business logic
An accordion expandingStructure and disclosure, already modelled by HTML
A dropdown opening and closingState that the browser already tracks
Calculating somebody's insurance policyGenuinely behaviour — this is why the distinction matters
The criterion he implies, and it is a good one: if it is about making the system usable and understandable, the browser should own it; if it is about running your business, it belongs in code you control. That line is why accordions and dropdowns have moved into HTML/CSS and your pricing engine has not.

📂 Accordions without JavaScript 13:47

<details> and <summary> have existed for over a decade — Chrome and IE early on, Firefox since about 2012 — while every component library ships an accordion built from nested <div>s.

NeedHow, natively
A disclosure widget<details><summary>…</summary> plus content
Mutually exclusive accordionsGive each <details> the same name attribute — opening one closes the others (Baseline 2024)
Styling the open statedetails[open], plus the ::details-content pseudo-element for the body
Removing the awkward first-child margin& > *:first-child { margin-top: 0 }
The name attribute is the whole upgrade. Before it, a hand-built accordion had to exist because exclusivity was impossible without JavaScript. One attribute later, the native element does the same job with correct keyboard behaviour, focus management and semantics included — and the library component that rebuilt it becomes a liability rather than a convenience.

🪆 Native nesting 16:48

Nesting arrived natively in browsers, so details summary, details[open] and ::details-content can live inside one another, with & referring to the parent selector.

details {
  summary { cursor: pointer }
  &[open] { background: navy; color: white }
  &::details-content { border: 1px solid silver }
}
"The existential question: does code need to look nice anymore? Are humans even going to bother reading it? I'm going to keep reading it. So I'd like it if it looks nice."

📏 The nine-year bug 21:26

Everyone knows the trick that does not work: transition: height 5s on something whose height is auto. It fails because the browser cannot interpolate to an unknown value — the browser does not know what halfway between zero and unknown is.

What makes the story worth telling is why it stayed broken for roughly nine years:

ReasonDetail
Ship the bug, get a workaroundDevelopers built their own solutions around the broken behaviour
Fixing it breaks themDavid Baron catalogued sites that would break if the bug were simply fixed — Stack Overflow, Alibaba Cloud, Intuit, UPS, and more
So the fix must be opt-inA new property rather than corrected behaviour

The answer is interpolate-size: allow-keywords, set once at the root. The spec even carries the apology: if we had a time machine, this property would not need to exist.

Support, checked: MDN currently lists interpolate-size as limited availability — it does not work in some widely used browsers, and at the time of the talk neither Firefox nor Safari implemented it. Safari is the only engine allowed on iOS, so an iPhone user does not escape the gap by installing Chrome. This is precisely why the demo pairs the feature with @supports.

🎚 Discrete transitions 23:49

With the height animating, a new problem appears: the panel opens smoothly but closes instantly, because the browser removes the content immediately and then sees no point animating something that is gone. The fix is transition-behavior: allow-discrete.

Transition typeExampleBehaviour
Continuous20px → 50pxThere is a mathematical path; interpolate it
DiscreteComic Sans → Helvetica; visible → hiddenNo meaningful halfway point. allow-discrete says: animate first, then switch
Two properties, one idiom, and it is becoming the standard recipe for native disclosure animation: interpolate-size for the size, transition-behavior: allow-discrete for the exit. MDN also still flags transition-behavior as limited availability, which is why the @supports wrapper below is not paranoia — it is the difference between a demo and something you ship.

🛡 Graceful degradation 27:54

"If you're not ready for this yet, ignore the whole thing — we don't want our full-featured implementation to run half of it and then the other half falls over horribly."

@supports (interpolate-size: allow-keywords) { … } puts the entire enhancement in one block. Where it is supported, you get smooth motion; where it is not, the element snaps open — which is exactly how native disclosure behaved for the last fourteen years, and it remains usable.

This is the pattern that makes shipping modern CSS rational: enhance the built-in behaviour, never replace it. Because the underlying interaction is HTML's, an unsupported enhancement degrades to "clunky" rather than "broken" — and when the other engines ship, your site improves without a deploy. His claim about the NDC conference sites is the proof: with JavaScript switched off, only analytics and a chat widget stop working.

🎨 Colour: names versus models 28:18

The named-colour history is comedy with a melancholy ending. The 216-ish web colours came from X11's rgb.txt, assembled from files found around the internet — one of which was somebody typing in a paint catalogue, another a box of Crayola crayons.

ColourOrigin
Dodger blueThe Dodgers
Alice blueAlice Roosevelt's favourite colour
OrangeAdded to the spec because browsers already supported it and Eric Meyer used it in tutorials
rebeccapurpleA memorial: Eric Meyer's daughter Rebecca, who died of a brain tumour aged six, wanting to be called Rebecca when she grew up

Then the engineering problem: names are lovely and useless for computation. RGB is easy to compute and matches how eyes work (roughly), HSL is more human ("we need this cushion, but green"), and both got a syntax renovation — commas dropped so the space could be used for / transparency and for new colour models.

The perception argument that motivates OKLCH is the best thirty seconds of physics in the talk: a saturated blue and a saturated yellow can carry the same optical energy, but yellow triggers a much stronger response in the eye. So an RGB "rainbow" generated by rotating hue has wildly uneven perceived intensity — the yellow screams, the blue disappears. Perceptual models exist to make equal steps look equal.

🌈 OKLCH and procedural palettes 35:05

OKLCH arrived in 2020, from Sweden, with a name that is exactly as modest as it sounds: lab was okay, so this is the okay-lab, in cylindrical form.

ApproachResult
Rotate hue in RGB/HSLUneven intensity; some entries unreadable
Rotate hue in OKLCHConsistent lightness and contrast across tints
Tetradic palette from one customer colourFour related shades that cannot really go wrong, generated procedurally
"Let your customer choose their favourite colour, then do everything else procedurally so you get stuff that works."
The kitchen-remodel analogy is the argument for design systems in one paragraph: show customers the worktops and the handles — let them feel in control of the choices that only affect taste — while the expert decides where the fridge goes. Applied to theming: accept one brand colour as input, derive the palette, contrast and hierarchy from it, and the output is always coherent. Change the input and everything shifts together, still in tune.

🔄 Animating variables 37:30

Custom properties are strings by default, so the browser cannot animate them — nothing happens until you declare what the value is. That is what @property does, and it is the first glimpse of CSS's type system.

Most languagesCSS
int, string, float, boolean, pointerangle, colour, length, z-index, geometry
Types reflect computationTypes reflect the medium — which is why 0deg → 360deg can be animated and "red" → "blue" cannot, unless declared as a colour

Declare an angle property with inherits: true, animate it on the root with keyframes, and every element reading that variable moves — and can derive colour from the same angle, so the hue rotates at exactly the rate the geometry rotates.

The pattern to remember: one animated variable on the root, consumers that derive from it. It is the CSS equivalent of a single source of truth for state, and it means a palette or a layout can be changed by animating one number rather than by coordinating dozens of rules.

🧱 Gradients as patterns 40:03

TechniqueWhat it produces
Hard colour stops in a conic gradient, tiled with a fixed background sizeCheckerboard — useful for proving a PNG is genuinely transparent
Radial gradient with a fixed tile sizePolka dots
Two repeating linear gradients over a solid layerGraph paper, with no image request
background-blend-mode: saturation then a rainbow layer with a colour blendA photograph recoloured to the current theme's dominant colour

He mentions that the BBC News site once tinted its entire colour scheme to match the day's headline photograph — a trick that is now a few lines of CSS.

🔽 Customisable selects 43:33

The holy grail that was long impossible: a native <select> whose popup you can style. It was impossible because the dropdown was drawn by the operating system, not the browser — Windows 3.1 shipped a listbox with keyboard typeahead, tab order and arrow navigation that many hand-built web dropdowns still do not match.

The modern syntax keeps the native control and opts in explicitly: appearance: base-select, then style ::picker(select), option, ::checkmark and the arrow. A ::selectedcontent element mirrors whatever was chosen, which is how the "social post" demo works with nearly no JavaScript.

Support, checked: MDN lists ::picker as limited availability. Chrome has it; at the time of the talk Safari and Firefox had not shipped it. That does not make the code wrong — it makes it a paired enhancement: the page works today, and improves when the engines ship. His framing is the mature one: because this is standards-based, we know what it will look like when it arrives.
The performance point underneath the fun — a chevron doing a 3D flip is one line of CSS — is that CSS animations run off the main thread onto the GPU, whereas a JavaScript animation competes with everything else your single browser thread is doing. If you are streaming results, rendering a game or collaborating in real time, decorative motion should not be scheduled on the same thread as the work.

🤖 CSS versus the prompt 50:17

The section that makes this a 2026 talk. His observation is not "AI is bad at CSS" — it is about which parts of the work the model is good at.

AI is strong when…AI is weak when…
The thing has a name everyone agrees on: "Quake inverse square root", "identity map with a sliding window cache", "login with Entra ID"The goal is a picture in your head that has no name: a specific visual arrangement you will only recognise when you see it
There is a shared vocabulary for the patternThe requirement is taste: audience, vibe, which colours work together
You need a bug explained — he puts CSS into a model and gets a useful answer about 80% of the timeYou need eight lines of layout code that mean exactly what you meant
"Would you rather write the eight lines of code, or would you rather keep refining the prompt until you have said 'it's a three-stage fluid column expressed as padding rather than max-width'?"
The argument is about compression, not pride. CSS is a compact notation for a visual intention; a prompt is a lossy natural-language description of the same intention, and the round trip through markdown costs you the precision you already had. His conclusion is unusually well-calibrated: this is not every scenario, and the models are improving — but the last mile between "roughly right" and "exactly right" is where reading and writing the language still pays.

He also names the homogenisation effect, quoting the morning keynote: everyone using the same tools trained on the same data ends up building the same site — and the fix is personality in the prompt, which is another word for taste.

🐦 Ladybird, and the rest 55:37

The closing notes:

  • Ladybird, the independent browser, said in January it would reach alpha in autumn 2026; at the time of the talk it was not there yet. His point stands regardless: because every part of a browser is covered by open specifications, a standards-compliant browser from outside the big four is now an engineering and funding problem rather than a permission problem.
  • The CSS community is unusually healthy — at CSS Day, the people who write the specs, the people from WebKit and Mozilla, and the people building pages are in the same room, pulling in the same direction.
  • What he did not cover: grid, flexbox, masonry, 3D transforms, view transitions, container queries — an hour only touched part of it.
"The next time you find yourself reaching for a JavaScript way to do something, just take a moment and ask: can I do this in pure CSS? Because you probably can, it'll probably be about four lines of code, and it'll run on the GPU instead of taking up your browser thread."
And the closing anecdote earns its place. Someone took his "set this text in 72-point Cambria bold royal blue with a drop shadow, and you can only use Haskell" joke literally — using an unsecured Chipotle ordering chatbot as the code generator, in a repository named pettiness. He installed a Haskell runtime to check. They had done it.

✅ Claims checked

ClaimVerdictEvidence
<details>/<summary> are over a decade oldCorrectLong-standing HTML; Firefox since ~2012; MDN lists the element as Baseline widely available
Mutually exclusive accordions via name, Baseline 2024CorrectGrouping <details name> is a recent, now widely shipped addition
Native CSS nesting is availableCorrectShipped across engines; & refers to the parent selector
You cannot transition to height: autoCorrectIntrinsic sizes are not interpolable by default
The fix took roughly nine years and had to be opt-in because fixing it broke real sitesCorrect in substanceDavid Baron's compatibility analysis; the spec for interpolate-size explicitly notes it would not exist with a time machine
interpolate-size: allow-keywords is the opt-inCorrect — and still limitedMDN marks it limited availability; at the talk it was unsupported in Firefox and Safari
transition-behavior: allow-discrete fixes the instant closeCorrect — with a caveatMDN also flags transition-behavior as limited availability, so pair it with @supports as the talk does
Styling the select popup is not yet cross-browserCorrect::picker is limited availability; Chrome has it, Safari and Firefox had not shipped at the time
OKLCH dates from 2020 and improves on Lab for perceptual uniformityCorrectPublished by Björn Ottosson in 2020
rebeccapurple is a memorial for Rebecca MeyerCorrectAdded to CSS Color 4 at the request of the working group; Eric Meyer asked for "rebecca", not "becca"
@property is required to animate a custom propertyCorrectUnregistered custom properties have no type, so there is nothing to interpolate
CSS animations can run off the main threadCorrect in practiceCompositor/GPU-driven for animatable properties; JS animation competes for the single main thread
Named web colours came from X11's rgb.txt, ultimately from paint catalogues and crayonsHis telling; accurate in outlineThe X11 colour list's provenance is folkloric — the specific paint-catalogue and Crayola claims are the entertaining version, not a documented chain
Ladybird planned alpha in autumn 2026 and had not reached itCorrect as statedHis characterisation at the time of the talk; the project has been building in public
Chipotle chatbot used to write Haskell in a repo named pettinessAnecdoteTold on stage as a real event, verified by him in person; not independently confirmed here

Basis note. Built from the full 1:00:27 recording. Every feature claim was checked against MDN's current support status, which matters more here than in most articles: three of the techniques demonstrated — interpolate-size, transition-behavior and ::picker — are still marked limited availability, which the talk itself acknowledges and designs around with @supports.

🔑 Key takeaways

  • The CSS you rejected ten years ago is not the CSS you have. If your opinion is that old, it is a memory, not an assessment.
  • CSS rots from fear, not ignorance. Someone breaks something unrelated, everyone stops editing, and fifteen button styles accumulate.
  • Mistakes in CSS are permanent because it ships inside browsers — which is why every improvement arrives opt-in.
  • Ask whether it is presentation or business logic. If it makes the system usable, the browser should own it.
  • Stop rebuilding accordions. <details> with a shared name is a mutually exclusive accordion with correct keyboard behaviour, free.
  • interpolate-size plus transition-behavior: allow-discrete is the recipe for animated disclosure — wrap it in @supports until support widens.
  • Enhance, don't replace, and degradation is free: unsupported motion snaps instead of breaking, and the site improves when engines ship.
  • Generate palettes in a perceptual space. Rotating hue in RGB gives uneven intensity; OKLCH gives tints with matched contrast.
  • Let users choose one colour; derive the rest procedurally. Control where it matters, automate where taste cannot go wrong.
  • Declare the type of a custom property with @property or it cannot animate — CSS types are angles, colours and lengths, not ints and strings.
  • Hard stops and tiling turn gradients into patterns — checkerboards, polka dots, graph paper, all with no image requests.
  • Customisable selects exist but are still limited availability; the native listbox already has accessibility most hand-built dropdowns lack.
  • AI is strongest where a name exists and weakest at the last mile of a visual intention; the compact notation still beats the prompt for precision.
  • Decorative motion belongs on the GPU, not on the thread doing the work.

🔗 Resources

Basis note. A conference talk's claims are mostly about features, and features are checkable — so every notable technique here was verified against MDN's current support status rather than repeated from the stage. The historical anecdotes (the paint catalogue, the £15 buttons, the Chipotle chatbot) are told as stories and labelled as such.

⏱ Timestamp index

0:10Why people don't care about CSS
4:00Mistakes baked into browsers forever
9:20Border radius, nine-slice tables, and the fashion cycle
11:35Structure, presentation, behaviour — and the shift
13:47details, summary, and mutually exclusive accordions
16:48Nesting with &
21:26Why you cannot animate to auto height
22:51interpolate-size, and the time-machine note
23:49Discrete transitions for the close
27:54@supports and graceful degradation
28:18Named colours, and rebeccapurple
35:05OKLCH and tetradic palettes
37:30@property and animating variables
40:03Gradient patterns and blend modes
43:33Customisable select, ::picker and ::selectedcontent
46:40GPU versus the main thread
50:17AI, shared vocabulary, and the last mile
55:37Ladybird and the CSS community
59:40The Chipotle chatbot and the pettiness repo
☰ View all