6 Commits
Author SHA1 Message Date
Dannon Baker f5b68adf9a Let the token parser read a declaration that ends at the closing brace
parseCustomProperties now accepts either a semicolon or the block's closing brace as the end of a value, stepping over SCSS #{...} interpolation, so the no-redeclare check is as strict as the name-only regex it replaced. Output on theme.css, tokens.css, brand-tokens and custom_theme_variables.scss is unchanged.
2026-11-03 11:00:05 -05:00
John ChiltonandClaude Opus 5.5 fea1c0e34f Use @theme static so Tailwind keeps every token
Plain @theme emits only variables that generated utilities use; checked
with Tailwind 4.1.18, --field-*, --font-size-*, --background-color and
unused shades were dropped. galaxy-ui components read them via var().
Generated tokens.css is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:00:04 -05:00
John ChiltonandClaude Opus 5.5 59b30cd7ad Pin semantic tokens to the Bootstrap theme colors they copy
primary, secondary, success, info, danger and foreground copy $brand-*
from blue.scss; retuning one side would drift the Bootstrap UI from the
token-styled UI unnoticed. resolveToken moves beside parseCustomProperties.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:00:04 -05:00
John ChiltonandClaude Opus 5.5 52a42e188b Share one custom-property parser across token tests
tokens.test.ts and tokensContract.test.ts each had their own regex for
--name: value; declarations. Export it beside readTokenSources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:00:04 -05:00
Dannon Baker 3801abcd87 Add semantic color tokens to galaxy-ui
Names follow shadcn/ui where it has one (background, muted, sidebar-*,
accent, primary, secondary, border, ...) plus selected, highlight and
inverse for Galaxy, so the coming Tailwind colour codemod has meaningful
targets instead of raw shades. accent is the blue-100 hover surface,
selected blue-200, sidebar-accent grey-200 and headers sit on secondary,
picked from side-by-side screenshots on #23702. Tests check every name
resolves to a palette value and that primary, foreground and highlight
still match @galaxyproject/brand-tokens.
2026-11-03 10:59:36 -05:00
Dannon Baker 31d0a89551 Generate galaxy-ui's tokens.css from a single theme.css
The package tokens now live in one hand-edited Tailwind @theme block, and a
small script emits the plain :root tokens.css that consumers without
Tailwind import. That gives the upcoming Tailwind setup a source it can
import directly instead of a hand-kept registration list. Values are
unchanged; a test fails if tokens.css drifts from theme.css.
2026-11-03 10:58:58 -05:00