Is it possible create a custom theme using another custom theme as a basis? #2641
-
According to the docs, it is possible to create a custom theme using a bundled theme as a basis, like this: module.exports = {
//...
daisyui: {
themes: [
{
light: {
...require("daisyui/src/theming/themes")["light"],
primary: "blue",
secondary: "teal",
},
},
],
},
} Would it be possible to create a custom theme using as a basis another custom theme? Maybe something like this module.exports = {
//...
daisyui: {
themes: [
{
myMainTheme: {
"primary": "#a991f7",
"secondary": "#f6d860",
"accent": "#37cdbe",
"neutral": "#3d4451",
"base-100": "#ffffff",
},
},
{
myAltTheme: {
// here something like ...require("daisyui/src/theming/themes")["light"], but targeting myMainTheme
"primary": "#f660d8",
},
},
],
},
} |
Beta Was this translation helpful? Give feedback.
Answered by
saadeghi
Dec 11, 2023
Replies: 1 comment 1 reply
-
You can do something like this: const mytheme = {
primary: '#e400ff',
secondary: '#0074ff',
accent: '#00f18e',
neutral: '#171103',
'base-100': '#f8fbff',
}
module.exports = {
plugins: [require('daisyui')],
daisyui: {
themes: [
{
theme1: mytheme,
theme2: {
...mytheme,
primary: 'indigo',
},
},
],
},
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
saadeghi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do something like this:
https://play.tailwindcss.com/0dpuiBpKEl?file=config