Skip to content

Commit

Permalink
Convert camelCase to kebab-case for color names in tailwind configura…
Browse files Browse the repository at this point in the history
…tion

This commit transitions the naming convention for our custom Tailwind color
classes from camelCase to kebab-case.
This shift aligns our custom classes with the standard Tailwind CSS naming
convention, ensuring consistency and clarity.
  • Loading branch information
rainerdema committed Oct 20, 2023
1 parent 746ed28 commit 788d7f0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions admin/app/components/solidus_admin/ui/badge/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ class SolidusAdmin::UI::Badge::Component < SolidusAdmin::BaseComponent
include ViewComponent::InlineTemplate

COLORS = {
graphite_light: "text-black bg-graphiteLight",
graphite_light: "text-black bg-graphite-light",
red: 'text-red-500 bg-red-100',
green: 'text-forest bg-seafoam',
blue: 'text-blue bg-sky',
black: 'text-white bg-black',
yellow: 'text-orange bg-papayaWhip',
yellow: 'text-orange bg-papaya-whip',
}.freeze

SIZES = {
Expand Down
2 changes: 1 addition & 1 deletion admin/app/components/solidus_admin/ui/toast/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class SolidusAdmin::UI::Toast::Component < SolidusAdmin::BaseComponent
SCHEMES = {
default: %w[
bg-fullBlack text-white
bg-full-black text-white
],
error: %w[
bg-red-500 text-white
Expand Down
2 changes: 1 addition & 1 deletion admin/app/views/solidus_admin/base/unauthorized.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="p-4">
<h1 class="text-3xl font-semibold text-solidusRed mb-4"><%= t('solidus_admin.errors.authorization.access_denied.title') %></h1>
<h1 class="text-3xl font-semibold text-solidus-red mb-4"><%= t('solidus_admin.errors.authorization.access_denied.title') %></h1>
<p class="text-lg text-gray-700"><%= t('solidus_admin.errors.authorization.access_denied.description') %></p>
</div>
8 changes: 4 additions & 4 deletions admin/config/solidus_admin/tailwind.config.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ module.exports = {
current: "currentColor",

// Primary palette
solidusRed: "#ef3023",
'solidus-red': "#ef3023",
black: "#222222",
graphite: "#c7ccc7",
graphiteLight: "#d8dad8",
'graphite-light': "#d8dad8",
sand: "#f5f3f0",
white: "#ffffff",

Expand All @@ -37,10 +37,10 @@ module.exports = {
sky: "#cbdff1",
seafoam: "#c1e0de",
dune: "#e6bf9b",
fullBlack: "#000000",
'full-black': "#000000",

// Extra colors (not part of the original palette)
papayaWhip: "#f9e3d9",
'papaya-whip': "#f9e3d9",

// UI Red
red: {
Expand Down

0 comments on commit 788d7f0

Please sign in to comment.