# The Button That Was White On White

> Moving this site onto Plumbago cost no JavaScript and two bugs, and both came from CSS written before the move that was correct right up until it wasn't.

- Author: Olger Chotza
- Published: 2026-12-05
- Tags: design, open-source, tooling
- Canonical: https://ochotzas.com/notes/the-button-that-was-white-on-white

This site now runs on [Plumbago](https://plumbago.ochotzas.com/), my set of components that move like iOS. That should have been awkward. The site is Astro and ships no framework; Plumbago is React, built on Base UI and Tailwind CSS v4.

<figure>
  <img class="shot-light" src="https://ochotzas.com/notes/plumbago-hero-light.jpg" width="2400" height="1440" alt="The Plumbago docs home page: a phone shows a reply sheet you can drag down, next to the heading Sheets you drag." />
  <img class="shot-dark" src="https://ochotzas.com/notes/plumbago-hero-dark.jpg" width="2400" height="1440" alt="The same docs page in dark mode." />
  <figcaption>The Plumbago docs. The sheet on the phone follows your finger when you pull it down. It follows this site's theme toggle, so switch it to see the other half.</figcaption>
</figure>

The code is at [ochotzas/plumbago](https://github.com/ochotzas/plumbago), and the CLI is on npm as [`plumbago`](https://www.npmjs.com/package/plumbago). Each component is copied into the project as source, the way [shadcn/ui](https://ui.shadcn.com) does it, so the files in this site's `src/components/ui/` are its own to change.

It wasn't awkward, because Astro [renders a React component with no `client:` directive](https://docs.astro.build/en/guides/framework-components/) to plain HTML at build time. The islands, the rows, the tags on the home page are Plumbago components, and the browser never hears about React. No page on this site loads it. The components became a templating language that happens to share code with the real thing.

That part went fine. The two things that broke were both mine, and both were older than the move.

## The button that was white on white

The email button on the contact page rendered as a white capsule with no text. The markup was right: `bg-ink text-on-ink`, ink background, light text. Both classes were in the CSS.

So was this, from the site's own reset:

```css
a {
  color: inherit;
}
```

Tailwind v4 puts its utilities in `@layer utilities`. My reset was in no layer at all. In the cascade, an [unlayered rule beats every layered one](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer), whatever the specificity. A bare `a` selector outranked `.text-on-ink`, the link inherited the page's ink colour, and the page's ink colour was also the button's background. In dark mode that is white on white.

The fix is one wrapper:

```css
@layer base {
  a {
    color: inherit;
  }
}
```

The reset was correct before the move. It became wrong the moment something else on the page started using layers, and nothing about it changed.

## The name that flickered

Switching between light and dark made my name in the header flicker. The theme switch added a class that gave every element on the page a 320ms colour transition:

```css
:root.theme-switching * {
  transition: color 320ms, background-color 320ms;
}
```

Colour inherits. The header sets it, the brand link inherits it, the name inside inherits that. When the root's colour changes, each level starts its own transition, and every frame its parent hands it a new value, so it starts again. Six levels below the root, the text is chasing a target that moves on every frame.

The fix animates the theme once, at the root, and lets everything else follow. CSS can transition a custom property if you [register it](https://developer.mozilla.org/en-US/docs/Web/CSS/@property) as a colour:

```css
@property --pb-ink {
  syntax: "<color>";
  inherits: true;
  initial-value: transparent;
}

:root.theme-switching {
  transition: --pb-ink 320ms;
}

:root.theme-switching * {
  transition: none !important;
}
```

Everything on the page reads its colours from those properties, so one animated value per colour replaces a transition on every element of the page.

## The preset that changed one line

Plumbago themes from a preset code made on its [Create](https://plumbago.ochotzas.com/create) page. `npx plumbago apply b4020001` turned the accent from blue to graphite, and every link on the site followed, because nothing on the site names a colour directly anymore.

It also put a Google Fonts import back at the top of the stylesheet, which I took out again. This site serves Figtree itself, and a preset doesn't know that.

[Docs](https://plumbago.ochotzas.com/) · [Components](https://plumbago.ochotzas.com/components/button) · [Create a theme](https://plumbago.ochotzas.com/create) · [GitHub](https://github.com/ochotzas/plumbago) · [npm](https://www.npmjs.com/package/plumbago)
