Skip to content

v0.13.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 17:33
· 186 commits to master since this release

Cirth v0.13.0

Cirth v0.13.0 turns the palette into something you drive rather than
restate: set one token and the accent follows it everywhere. Print moves
out of the bundle, the presets are redesigned around who they are for, and
the customization guide is rewritten to explain the whole surface rather
than pointing at a compiled file.

A minor with four breaking changes, all of them one-line fixes. None of
them touches your markup.

Before you upgrade

  • Print is a separate stylesheet. A page that links only
    cirth.min.css now prints with no pass at all. Add
    <link rel="stylesheet" href="cirth.print.min.css" media="print"> after
    the main build. It moved because it is ~630 B gzipped that is never
    needed to paint the screen — as a separate sheet the browser fetches it
    at low priority instead of charging it to every visitor.
  • A :root override now reaches into forced-scheme subtrees. Colours
    used to be redeclared on every [data-theme] element, so an override
    written at :root stopped at the edge of one and the documentation told
    you to repeat it there. The scheme differences are stated once as
    light-dark() pairs now. To vary a token by scheme, write the pair:
    --cirth-primary: light-dark(#2563eb, #93c5fd).
  • The presets are renamed and redesigned. cobalt and coral are gone;
    plain and playroom replace them, named for their character rather
    than their hue. Neither is a recolouring of an old one.
  • .outline buttons have a surface. They paint the page colour instead
    of being transparent. If transparent was the point, that is the new
    .ghost.

The Upgrading page has the
before-and-after for each.

The palette is driven by inputs

--cirth-primary is an input now. Set it and the fill, the hover, the
focus ring and the underline tint follow — they are relationships the
browser evaluates, not values listed beside it. The ratios reproduce the
shipped amber ladder step for step, so introducing them changed no colour:
this is the same theme, stated differently.

The same applies to status: --cirth-error, --cirth-success and
--cirth-warning are new, and each drives four roles. They did not exist
before — the status palettes lived only inside the tokens that consumed
them, baked in by Sass, so a theme could not move them without rewriting
every consumer by hand.

--cirth-canvas is new too: the page surface as a value of its own,
because --cirth-background-color is a slot components paint through and
could not be relied on to mean the page.

Two presets, read from both ends

plain is the conventional application baseline — a familiar blue accent,
a plain white page, headings in the body face. It is four declarations,
all of them input tokens, and it exists partly to prove the point: a
coherent, accessible, light-and-dark theme in four lines.

playroom is the expressive end — a soft violet accent, tinted surfaces,
large radii, a rounded system face, generous spacing, springy motion. It
reaches across colour, geometry, typography, motion and depth, and
overrides two derived tokens on purpose so its hover lightens rather than
darkens.

Also in this release

  • A .ghost button variant in all three colour groups: no surface, no
    border, a hover that tints its own background. What an icon button in a
    header wants.
  • Form controls answer the pointer. input, select and textarea
    had no :hover at all.
  • The bundles are smaller. cirth.min.css 14,010 → 13,372 B gzipped,
    even after everything above, because print left and dead compatibility
    scaffolding went with it.
  • The customization guide is rewritten, 194 lines to 800: how the token
    system works, five runnable examples, the accessibility boundary in plain
    terms, and a reference covering all 247 tokens — generated from the
    source, so it cannot drift.

Fixed

  • A button label lost contrast under prefers-contrast: more in the dark
    scheme, reaching 4.2:1 — worse than with no preference expressed.
  • [type="reset"].outline came out with the secondary colours whether or
    not it asked for them.

Full Changelog: v0.12.0...v0.13.0