From c7edece3bd0fa1195ad7b91f55f25a5e013ee86c Mon Sep 17 00:00:00 2001 From: Cirdes Date: Thu, 29 Oct 2026 11:48:19 -0300 Subject: [PATCH] [Bug Fix] Align --chart-1..5 with shadcn neutral theme The neutral theme in shadcn (apps/v4/registry/themes.ts) uses a grayscale chart scale, the same in light and dark. RubyUI still shipped the older colored values, so the shadcn-audit theme check failed with 10 token diffs. Update the docs stylesheet, the install generator template, both installation pages and the neutral theme in Theme::CSS. Colored themes in Theme::CSS keep their current chart values. Co-Authored-By: Claude Opus 5.5 --- .../stylesheets/application.tailwind.css | 20 +++++++++---------- .../views/docs/installation/rails_bundler.rb | 20 +++++++++---------- .../docs/installation/rails_importmaps.rb | 20 +++++++++---------- docs/lib/theme/c_s_s.rb | 20 +++++++++---------- .../install/templates/tailwind.css.erb | 20 +++++++++---------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/docs/app/assets/stylesheets/application.tailwind.css b/docs/app/assets/stylesheets/application.tailwind.css index 7cb4d7ac3..5330cac56 100644 --- a/docs/app/assets/stylesheets/application.tailwind.css +++ b/docs/app/assets/stylesheets/application.tailwind.css @@ -33,11 +33,11 @@ --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --radius: 0.625rem; --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); @@ -75,11 +75,11 @@ --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 15%); --ring: oklch(0.556 0 0); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376); diff --git a/docs/app/views/docs/installation/rails_bundler.rb b/docs/app/views/docs/installation/rails_bundler.rb index 1eb40d903..c99e095e2 100644 --- a/docs/app/views/docs/installation/rails_bundler.rb +++ b/docs/app/views/docs/installation/rails_bundler.rb @@ -257,11 +257,11 @@ def default_attrs --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --radius: 0.625rem; --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); @@ -299,11 +299,11 @@ def default_attrs --border: oklch(0.269 0 0); --input: oklch(0.269 0 0); --ring: oklch(0.439 0 0); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376); diff --git a/docs/app/views/docs/installation/rails_importmaps.rb b/docs/app/views/docs/installation/rails_importmaps.rb index e0e3373c6..d2a6d4a5f 100644 --- a/docs/app/views/docs/installation/rails_importmaps.rb +++ b/docs/app/views/docs/installation/rails_importmaps.rb @@ -258,11 +258,11 @@ def default_attrs --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --radius: 0.625rem; --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); @@ -300,11 +300,11 @@ def default_attrs --border: oklch(0.269 0 0); --input: oklch(0.269 0 0); --ring: oklch(0.439 0 0); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376); diff --git a/docs/lib/theme/c_s_s.rb b/docs/lib/theme/c_s_s.rb index 50e154874..d8d0e8a98 100644 --- a/docs/lib/theme/c_s_s.rb +++ b/docs/lib/theme/c_s_s.rb @@ -74,11 +74,11 @@ def self.neutral border: "oklch(0.922 0 0)", input: "oklch(0.922 0 0)", ring: "oklch(0.708 0 0)", - "chart-1": "oklch(0.646 0.222 41.116)", - "chart-2": "oklch(0.6 0.118 184.704)", - "chart-3": "oklch(0.398 0.07 227.392)", - "chart-4": "oklch(0.828 0.189 84.429)", - "chart-5": "oklch(0.769 0.188 70.08)", + "chart-1": "oklch(0.87 0 0)", + "chart-2": "oklch(0.556 0 0)", + "chart-3": "oklch(0.439 0 0)", + "chart-4": "oklch(0.371 0 0)", + "chart-5": "oklch(0.269 0 0)", radius: "0.625rem", sidebar: "oklch(0.985 0 0)", "sidebar-foreground": "oklch(0.145 0 0)", @@ -113,11 +113,11 @@ def self.neutral border: "oklch(1 0 0 / 10%)", input: "oklch(1 0 0 / 15%)", ring: "oklch(0.556 0 0)", - "chart-1": "oklch(0.488 0.243 264.376)", - "chart-2": "oklch(0.696 0.17 162.48)", - "chart-3": "oklch(0.769 0.188 70.08)", - "chart-4": "oklch(0.627 0.265 303.9)", - "chart-5": "oklch(0.645 0.246 16.439)", + "chart-1": "oklch(0.87 0 0)", + "chart-2": "oklch(0.556 0 0)", + "chart-3": "oklch(0.439 0 0)", + "chart-4": "oklch(0.371 0 0)", + "chart-5": "oklch(0.269 0 0)", sidebar: "oklch(0.205 0 0)", "sidebar-foreground": "oklch(0.985 0 0)", "sidebar-primary": "oklch(0.488 0.243 264.376)", diff --git a/gem/lib/generators/ruby_ui/install/templates/tailwind.css.erb b/gem/lib/generators/ruby_ui/install/templates/tailwind.css.erb index 15fd9f3ea..6adcfba66 100644 --- a/gem/lib/generators/ruby_ui/install/templates/tailwind.css.erb +++ b/gem/lib/generators/ruby_ui/install/templates/tailwind.css.erb @@ -28,11 +28,11 @@ --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --radius: 0.625rem; --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); @@ -70,11 +70,11 @@ --border: oklch(0.269 0 0); --input: oklch(0.269 0 0); --ring: oklch(0.439 0 0); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); + --chart-1: oklch(0.87 0 0); + --chart-2: oklch(0.556 0 0); + --chart-3: oklch(0.439 0 0); + --chart-4: oklch(0.371 0 0); + --chart-5: oklch(0.269 0 0); --sidebar: oklch(0.205 0 0); --sidebar-foreground: oklch(0.985 0 0); --sidebar-primary: oklch(0.488 0.243 264.376);