Skip to content

Add Kill Bill Design System 2026 tokens (assets 1.1.0) - #21

Merged
tungleduyxyz merged 2 commits into
mainfrom
kaui_9.23
Oct 5, 2026
Merged

tungleduyxyz merged 2 commits into
mainfrom
kaui_9.23

Conversation

@tungleduyxyz

Copy link
Copy Markdown
Contributor

Refs killbill/technical-support#316. Land this first — all engine PRs depend on these tokens.

  • New tokens.css — the single source of truth for the Kill Bill Design System 2026: 6 color primitive scales, semantic tokens (primary/surface/onSurface/outline/status/disabled/tag-containers), 16 Inter text styles as font: var(--kb-…) tokens, and a --kb-legacy-* section preserving old-theme values exactly.
  • Deterministic load order in common.css (explicit requires instead of require_tree; tokens first).
  • --bs-* Bootstrap bridge moved to bootstrap_and_overrides.css, right after bootstrap.min.css so it wins the cascade.
  • Gem stylesheets converted — theme.css, element.css, datatable.css: ~80 hardcoded colors → tokens; stale sourceMappingURL comments and a calc(unquote(...)) artifact removed.
  • README gains a "Theming / design tokens" section; version bumped 1.0.2 → 1.1.0.

Verified via assets:precompile in kaui-standalone (tokens defined once, bridge ordering correct).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The Bootstrap bridge is ineffective, several foreground pairs fail accessibility contrast, and DataTables duplicates a primitive color.

Review effort: Balanced
Findings: 4 Medium severity · 1 Low severity

Open (5)
What changed in this PR

Adds shared Kill Bill Design System 2026 tokens and migrates existing stylesheets to consume them.

Changes:

  • Introduces color, typography, semantic, and legacy tokens.
  • Establishes deterministic stylesheet ordering and Bootstrap mappings.
  • Converts legacy styles, documents theming, and releases version 1.1.0.
File Description
README.md Documents token usage and theming rules.
lib/​assets/​version.rb Bumps the gem to 1.1.0.
app/​assets/​stylesheets/​assets/​tokens.css Defines the design-system tokens.
app/​assets/​stylesheets/​assets/​theme.css Replaces hardcoded theme colors.
app/​assets/​stylesheets/​assets/​jquery_datatables.css Updates the selected-row color.
app/​assets/​stylesheets/​assets/​element.css Migrates legacy styling to tokens.
app/​assets/​stylesheets/​assets/​datatable.css Tokenizes legacy table colors.
app/​assets/​stylesheets/​assets/​common.css Makes asset ordering explicit.
app/​assets/​stylesheets/​assets/​bootstrap_and_overrides.css Adds the Bootstrap token bridge.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/assets/stylesheets/assets/bootstrap_and_overrides.css
Comment thread app/assets/stylesheets/assets/jquery_datatables.css Outdated
Comment thread app/assets/stylesheets/assets/tokens.css
Comment thread app/assets/stylesheets/assets/tokens.css
Comment thread README.md Outdated
- Add --kb-primary-500-rgb channel token and reference it from
  jquery_datatables.css instead of duplicating the raw RGB triplet.
- Clarify the Bootstrap bridge comment: Bootstrap 5.0.2 component rules
  use compiled hex, so the --bs-* vars serve var(--bs-*) consumers only;
  stock component theming lives in theme.css.
- Annotate the two Figma-sourced pairs that fall below WCAG AA
  (on-primary on primary-400, on-warning on warning-500) as pending
  design review.
- Fix the surface token shorthand typo in README.md.
@tungleduyxyz

Copy link
Copy Markdown
Contributor Author

Addressed the Copilot review in 490306a:

  • Duplicate RGB triplet — fixed: added --kb-primary-500-rgb: 21, 94, 239; channel primitive to tokens.css; jquery_datatables.css now references it (--dt-row-selected: var(--kb-primary-500-rgb);), restoring the token-only update workflow.
  • Bootstrap bridge overclaim — comment corrected: Bootstrap 5.0.2's compiled component rules never read --bs-* vars, so the bridge serves var(--bs-*) consumers only; stock component theming lives in theme.css's explicit overrides (as before this PR). Extending it to stock components would need a Bootstrap upgrade (5.3+), out of scope here.
  • README shorthand typo — fixed: surface tokens now listed explicitly.
  • WCAG AA contrast (pressed primary ~4.3:1, warning pair ~3.5:1) — both pairs come verbatim from the Figma design source (primaryPressed/onPrimary, warning/onWarning). Rather than fork implementation from design, both are now annotated in tokens.css as known issues pending design review.

@tungleduyxyz
tungleduyxyz merged commit c4331a7 into main Oct 5, 2026
7 checks passed
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.

2 participants