Skip to content

Theme the Trix / ActionText editor in light and dark - #67

Merged
Fivell merged 1 commit into
masterfrom
feat/trix-theming
Oct 13, 2026
Merged

Fivell merged 1 commit into
masterfrom
feat/trix-theming

Conversation

@Fivell

@Fivell Fivell commented Oct 13, 2026

Copy link
Copy Markdown
Member

Theme the Trix / ActionText editor

Trix ships with ActionText (a Rails built-in, pulled transitively via rails → action_text-trix), so any ActiveAdmin app can expose a rich-text field. Its chrome was previously unthemed — on a dark palette the toolbar icons (black SVGs baked into Trix's base CSS) became invisible.

This themes the editor off the existing --aa-* tokens: toolbar, editor surface, link dialog, and .trix-content pre/blockquote. In dark mode the toolbar icons are inverted so they stay legible. The app still imports Trix's own base CSS — these rules only restyle it, and are inert when no editor is present.

A Rich text demo page was added to the dummy app, plus test/trix_screenshot.rb which produces the shots below.

Light

Trix light

Dark

Trix dark

@Fivell
Fivell force-pushed the feat/trix-theming branch from 367ea27 to 9b29984 Compare October 13, 2026 13:04
Trix ships with ActionText (a Rails built-in), so every ActiveAdmin app can
have a rich-text field. Theme its chrome — toolbar, editor surface, link
dialog, content pre/blockquote — off the --aa-* tokens so it follows the
palette in both modes. Trix bakes its toolbar icons into the base CSS as
black SVGs, so invert them in dark mode to keep them legible.

The app still imports Trix's own base CSS; these rules only restyle it and
are inert when no editor is present. Adds a Rich-text demo page to the dummy
app plus a screenshot task producing img/trix-{light,dark}.png.
@Fivell
Fivell force-pushed the feat/trix-theming branch from 9b29984 to ffabd05 Compare October 13, 2026 13:41
@Fivell
Fivell merged commit b2d891e into master Oct 13, 2026
3 checks passed
Fivell added a commit that referenced this pull request Oct 13, 2026
Both landed in #67/#68 without README coverage. Crisscross is opt-in like the
clock and theme toggle (require/import wigu/table_crisscross); Trix is styled
automatically. Screenshots reuse the ones the PRs added.
@Fivell Fivell mentioned this pull request Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant