FEATURE Passing a light green color to the theme scope
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-07-01 17:47:49 +02:00
parent ede021029a
commit e0895d6642
2 changed files with 11 additions and 21 deletions

View File

@ -3,9 +3,7 @@ const tailpress = require('@jeffreyvr/tailwindcss-tailpress');
// Fonction pour obtenir la couleur de base depuis theme.json
const getBaseColor = (slug) => {
const color = theme.settings.color.palette.find(
(c) => c.slug === slug
);
const color = theme.settings.color.palette.find((c) => c.slug === slug);
return color ? color.color : null;
};
@ -27,11 +25,9 @@ module.exports = {
},
extend: {
colors: {
...tailpress.colorMapper(
tailpress.theme('settings.color.palette', theme)
),
...tailpress.colorMapper(tailpress.theme('settings.color.palette', theme)),
'carhop-green': {
50: '#f1fcf9',
50: getBaseColor('carhop-green-light'),
100: '#cef9ee',
200: '#9df2de',
300: '#64e4c9',
@ -83,25 +79,14 @@ module.exports = {
950: '#2b0665',
},
},
fontSize: tailpress.fontSizeMapper(
tailpress.theme(
'settings.typography.fontSizes',
theme
)
),
fontSize: tailpress.fontSizeMapper(tailpress.theme('settings.typography.fontSizes', theme)),
},
screens: {
xs: '480px',
sm: '600px',
md: '782px',
lg: tailpress.theme(
'settings.layout.contentSize',
theme
),
xl: tailpress.theme(
'settings.layout.wideSize',
theme
),
lg: tailpress.theme('settings.layout.contentSize', theme),
xl: tailpress.theme('settings.layout.wideSize', theme),
'2xl': '1441px',
},
},

View File

@ -19,6 +19,11 @@
"slug": "carhop-green",
"color": "#136f63"
},
{
"name": "Carhop Green Light",
"slug": "carhop-green-light",
"color": "#f1fcf9"
},
{
"name": "Carhop Orange",
"slug": "carhop-orange",