Home

Latest post

Aligned doorways through rooms with alternating ivory and charcoal walls

Introducing CSS Hooks v4

You used to reach for React Context. Now you don't even need JavaScript. With flags in CSS Hooks v4, an element can inherit, transform, and pass on styling state entirely through CSS.

| 5 minutes

Still worth a read

  • A person being washed down a cascade waterfall

    The perils of the cascade

    Complex style resolution, global scope, and broken component boundaries: Why I don't trust the cascade and you shouldn't either

    | 4 minutes
  • A 19th-century inventor standing next to a Rube Goldberg machine

    From CSS madness to CSS Hooks

    Why does styling a component involve so much machinery? A look at the tradeoffs we've accepted in pursuit of a simpler developer experience. Is there a better way?

    | 9 minutes
  • A craftsperson fitting contrasting wooden pieces together with a dovetail joint

    Function asChild

    The pitfalls of polymorphic components, and how I use a time-tested React design pattern to overcome them

    | 12 minutes