Skip to content

Commit

Permalink
refactor: extract variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioVentilii committed Oct 25, 2024
1 parent e9cd677 commit 642c36d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { colorsBase } from './base';

export const colorsTheme = {
export const themeDefault = {
brand: {
base: colorsBase['blue-ribbon'],
500: colorsBase['cobalt']
Expand Down
12 changes: 12 additions & 0 deletions src/frontend/src/lib/styles/tailwind/colors/variables.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { themeDefault } from '$lib/styles/tailwind/colors/theme-default';

export const themeVariables = {
foreground: {
'brand-primary': themeDefault.brand.base,
'brand-secondary': themeDefault.brand[500],
warning: themeDefault.warning.default
},
background: {
'brand-primary': themeDefault.brand.base
}
};
11 changes: 2 additions & 9 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fontFamily } from 'tailwindcss/defaultTheme';
import type { Config } from 'tailwindcss/types/config';
import { colorsTheme } from './src/frontend/src/lib/styles/tailwind/colors/theme-default';
import { themeVariables } from './src/frontend/src/lib/styles/tailwind/colors/variables';

export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
Expand Down Expand Up @@ -54,14 +54,7 @@ export default {
beer: '#f7931a',
fulvous: '#de7900',
water: '#d1e3ff',
foreground: {
'brand-primary': colorsTheme.brand.base,
'brand-secondary': colorsTheme.brand[500],
warning: colorsTheme.warning.default
},
background: {
'brand-primary': colorsTheme.brand.base
}
...themeVariables
},
extend: {
backgroundSize: {
Expand Down

0 comments on commit 642c36d

Please sign in to comment.