Skip to content

Commit 6ed6a0f

Browse files
committed
docs: link the Theme Builder from the theming guide and mark its proposal implemented
1 parent 267bb3c commit 6ed6a0f

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
### Added
1111

1212
- **16 theme keys for fonts, dividers and corners** (additive; every one defaults to exactly what the grid drew before). `grid.headerFontFamily` / `headerFontWeight` / `cellFontFamily` / `cellFontWeight` (`--ogx-grid-header-font-family`, `--ogx-grid-header-font-weight` default 600, `--ogx-grid-cell-font-family`, `--ogx-grid-cell-font-weight`), `grid.headerPaddingX` (`--ogx-grid-header-padding-x`, defaults to the cell padding), `grid.borderWidth` (`--ogx-grid-border-width`, 1px) and `grid.borderRadius` (`--ogx-grid-border-radius`, defaults to `--ogx-border-radius-lg`), `grid.columnDividerWidth` / `headerColumnDividerWidth` / `rowDividerWidth` (`--ogx-grid-column-divider-width`, `--ogx-grid-header-column-divider-width`, `--ogx-grid-row-divider-width`, 1px; `0` hides them) and `grid.columnDividerColor` / `rowDividerColor` (`--ogx-grid-column-divider-color`, `--ogx-grid-row-divider-color`, default the grid border colour), and `overlays.fontFamily` / `fontWeight` / `fontSize` (`--ogx-overlay-font-*`) for the column menu, header filter menu, toolbar panels and AI panel. The hard-coded 1px divider borders of cells, rows, header rows, column-group rows, the header filter row, aggregation footer cells and the right-pinned edge now read these variables (logical `border-inline-*` properties kept). A new browser test (`lib/theme/defaultThemeBaseline.browser.test.tsx`) compares computed styles and element boxes of eleven grids (plain, pinned with column groups and selection, dark and compact presets, header filters and their menu, aggregation footer, toolbar panels, column menu) with a baseline captured before the change, in Chromium, Firefox and WebKit: no differences. Guide: *Fonts, dividers and corners* and the *hide the dividers* recipe in `docs/customization/theming.md`.
13+
- **Theme Builder demo page** (`/theme-builder`, under Customization, linked from the Theming page). Grouped, collapsible controls with a reset each: colour picker plus text field, font family (presets or custom), weight 300–800 and size, sliders for heights, padding, widths and radius, and show/hide switches for body column dividers, header dividers and row dividers (they set the width to 0). A live preview grid (toolbar, pinned column, selected row, row grouping, density switch, a button that opens the column menu) in `DataGridThemeProvider`. A Light / Dark switch picks which theme is edited and previewed; "Start from" loads a built-in preset. Copy theme (TypeScript, only values that differ from the defaults, light, dark or both; clipboard API with a fallback), Download `.ts`, Share via URL (`#theme=…`, restored on load). WCAG AA contrast hints for seven text/background pairs (warnings only) and a collapsed Advanced JSON editor for every theme key. Controls move into a drawer when the page is narrower than about 1,060 px. The demo smoke test also runs it in Firefox and WebKit.
1314

1415
### Internal
1516

‎docs/customization/theming.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ OpenGridX ships with a complete design-token system built on CSS custom properti
55
1. **`DataGridThemeProvider`** — the recommended React API (maps a typed `GridTheme` object → CSS variables)
66
2. **Raw CSS override** — set any `--ogx-*` variable yourself on a wrapper element or `:root`
77

8+
To design a theme without writing code, use the **[Theme Builder](https://opencorestack.github.io/OpenGridX/theme-builder)** demo page: controls for colours, fonts, sizes, borders and dividers, buttons and menus, edited separately for light and dark mode on a live grid, with WCAG AA contrast hints. It copies or downloads the result as a `GridTheme` (only the values that differ from the defaults) and can share it as a link (`#theme=…`).
9+
810
---
911

1012
## Quick Start — `DataGridThemeProvider`

‎docs/superpowers/specs/2026-10-12-theme-builder-proposal.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Theme Builder demo page — proposal
22

3-
Status: **proposal, awaiting approval** · Target: next minor (with the new theme keys it needs)
3+
Status: **approved 2026-10-13 — implemented** · Target: next minor (with the new theme keys it needs)
44

55
## Goal
66

0 commit comments

Comments
 (0)