Skip to content

Commit 971b35b

Browse files
andjschJayGeorgejasonvarga
authored
[6.x] Refactor CSS color variables (#13008)
Co-authored-by: Jay George <[email protected]> Co-authored-by: Jason Varga <[email protected]>
1 parent 76b4f30 commit 971b35b

File tree

32 files changed

+165
-69
lines changed

32 files changed

+165
-69
lines changed

packages/ui/src/Checkbox/Item.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ const checkboxClasses = computed(() => {
3535
'shadow-ui-xs mt-0.5 cursor-default rounded-sm border border-gray-400/75 bg-white',
3636
'dark:bg-gray-500 dark:border-gray-900',
3737
'data-[state=checked]:border-ui-accent-bg data-[state=checked]:bg-ui-accent-bg',
38-
'dark:border-none dark:data-[state=checked]:bg-dark-ui-accent-bg dark:data-[state=checked]:border-dark-ui-accent-bg',
39-
'dark:data-[disabled]:bg-dark-ui-accent-bg/60 dark:data-[disabled]:border-dark-ui-accent-bg/70',
38+
'dark:border-none',
39+
'dark:data-[disabled]:bg-ui-accent-bg/60 dark:data-[disabled]:border-ui-accent-bg/70',
4040
'dark:data-[disabled]:text-gray-400 dark:data-[disabled]:cursor-not-allowed',
4141
'shrink-0'
4242
],

packages/ui/src/Radio/Item.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const id = useId();
2828
class="
2929
relative flex h-full w-full items-center justify-center rounded-[50%]
3030
border border-ui-accent-bg after:block after:h-[0.5rem] after:w-[0.5rem] after:rounded-[50%]
31-
after:bg-ui-accent-bg after:content-[''] dark:border-none dark:after:bg-dark-ui-accent-bg
31+
after:bg-ui-accent-bg after:content-[''] dark:border-none
3232
"
3333
/>
3434
</RadioGroupItem>

packages/ui/src/Switch.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ const switchRootClasses = cva({
1717
'relative flex rounded-full shrink-0 border-2',
1818
'transition-colors cursor-pointer',
1919
'data-[state=checked]:shadow-inner data-[state=checked]:border-switch-bg data-[state=checked]:bg-switch-bg',
20-
'dark:data-[state=checked]:border-dark-switch-bg dark:data-[state=checked]:bg-dark-switch-bg',
21-
'data-[state=unchecked]:border-transparent dark:data-[state=checked]:border-dark-switch-bg dark:[.publish-fields_&]:data-[state=checked]:border-gray-800',
20+
'data-[state=unchecked]:border-transparent dark:[.publish-fields_&]:data-[state=checked]:border-gray-800',
2221
'data-[state=unchecked]:bg-gray-200 dark:data-[state=unchecked]:bg-gray-700'
2322
],
2423
variants: {

packages/ui/src/ui.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,13 @@
2121

2222
--color-body-bg: var(--theme-color-body-bg);
2323
--color-body-border: var(--theme-color-body-border);
24-
--color-dark-body-bg: var(--theme-color-dark-body-bg);
25-
--color-dark-body-border: var(--theme-color-dark-body-border);
2624
--color-content-border: var(--theme-color-content-border);
27-
--color-dark-content-bg: var(--theme-color-dark-content-bg);
28-
--color-dark-content-border: var(--theme-color-dark-content-border);
2925
--color-global-header-bg: var(--theme-color-global-header-bg);
30-
--color-dark-global-header-bg: var(--theme-color-dark-global-header-bg);
3126
--color-progress-bar: var(--theme-color-progress-bar);
3227
--color-focus-outline: var(--theme-color-focus-outline);
3328
--color-ui-accent-bg: var(--theme-color-ui-accent-bg);
3429
--color-ui-accent-text: var(--theme-color-ui-accent-text);
35-
--color-dark-ui-accent-bg: var(--theme-color-dark-ui-accent-bg);
36-
--color-dark-ui-accent-text: var(--theme-color-dark-ui-accent-text);
3730
--color-switch-bg: var(--theme-color-switch-bg);
38-
--color-dark-switch-bg: var(--theme-color-dark-switch-bg);
3931

4032
/* Temp */
4133
--color-dark-100: #dfe1e5;

resources/css/app.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
@layer components {
6565
.content-card {
66-
@apply min-h-full px-2 sm:px-6 md:px-12 pb-6 border dark:bg-dark-content-bg dark:border-y-0 dark:border-r-0 border-content-border dark:border-dark-content-border sm:rounded-2xl sm:rounded-r-xl sm:dark:rounded-none;
66+
@apply min-h-full px-2 sm:px-6 md:px-12 pb-6 border dark:border-y-0 dark:border-r-0 border-content-border sm:rounded-2xl sm:rounded-r-xl sm:dark:rounded-none;
6767
background: var(--theme-color-content-bg);
6868
.nav-closed & {
6969
@apply sm:rounded-xl;
@@ -72,7 +72,4 @@
7272
}
7373
}
7474
}
75-
.dark .content-card {
76-
background: var(--theme-color-dark-content-bg);
77-
}
7875
}

resources/css/components/fieldtypes/bard.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
}
208208

209209
.bard-footer-toolbar {
210-
@apply flex items-center justify-between rounded-b-lg border-t bg-white p-2 text-xs text-gray-700 shadow-none dark:border-dark-300 dark:bg-dark-800 dark:text-dark-175;
210+
@apply flex items-center justify-between rounded-b-lg border-t bg-white p-2 text-xs text-gray-700 shadow-none dark:border-gray-700 dark:bg-gray-900 dark:text-gray-400;
211211
padding: 8px 12px;
212212

213213
.bard-fullscreen & {

resources/css/components/fieldtypes/table.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Table Fieldtype
6464
@apply outline-hidden dark:bg-gray-900;
6565

6666
th {
67-
@apply bg-gray-50 p-2 text-sm font-medium text-gray-700 text-start border-r border-b border-gray-300 dark:border-dark-600 dark:bg-gray-925 dark:text-gray-100 overflow-hidden;
67+
@apply bg-gray-50 p-2 text-sm font-medium text-gray-700 text-start border-r border-b border-gray-300 dark:border-gray-700 dark:bg-gray-925 dark:text-gray-100 overflow-hidden;
6868

6969
tr:first-child & {
7070
@apply rounded-tl-lg;
@@ -101,7 +101,7 @@ Table Fieldtype
101101
}
102102

103103
td {
104-
@apply border-b p-0 dark:border-dark-600 border-e;
104+
@apply border-b p-0 dark:border-gray-700 border-e;
105105

106106
&:first-child.grid-cell {
107107
@apply ps-4;

resources/css/components/pagination.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@apply block h-full bg-white px-3 py-2 text-gray-900 dark:border-dark-900 dark:bg-dark-600 dark:text-dark-150 ltr:border-r rtl:border-l;
1010

1111
&:hover {
12-
@apply bg-gray-100 text-gray-900 dark:bg-dark-700 dark:text-dark-100;
12+
@apply bg-gray-100 text-gray-900 dark:bg-gray-850 dark:text-dark-100;
1313
}
1414
}
1515

@@ -26,7 +26,7 @@
2626
}
2727

2828
li.current a {
29-
@apply bg-gray-100 text-blue-600 shadow-inner dark:bg-dark-700 dark:text-dark-blue-100;
29+
@apply bg-gray-100 text-blue-600 shadow-inner dark:bg-gray-850 dark:text-dark-blue-100;
3030
}
3131
}
3232

resources/css/components/publish.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Here flexbox is much better suited to create a layout that grows to fill space.
111111
}
112112

113113
.publish-section-header {
114-
@apply rounded-t-lg border-b border-gray-400 bg-gray-100 dark:border-dark-900 dark:bg-dark-700;
114+
@apply rounded-t-lg border-b border-gray-400 bg-gray-100 dark:border-dark-900 dark:bg-gray-850;
115115
}
116116

117117
.publish-section-header-inner {

resources/css/elements/base.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ code:not(pre *) {
115115
color: hsl(from var(--theme-color-ui-accent-bg) h s 30);
116116
background: hsl(from var(--theme-color-ui-accent-bg) h s l / 0.08);
117117
&:where(.dark, .dark *) {
118-
color: hsl(from var(--theme-color-dark-ui-accent-bg) h s 90);
119-
background: hsl(from var(--theme-color-dark-ui-accent-bg) h s 10 / 0.5);
118+
color: hsl(from var(--theme-color-ui-accent-bg) h s 90);
119+
background: hsl(from var(--theme-color-ui-accent-bg) h s 10 / 0.5);
120120
}
121121
}

0 commit comments

Comments
 (0)