Gradient as color #780
Answered
by
saadeghi
LeonWehrhahn
asked this question in
Q&A
-
Is it possible to add gradients as a color? {
light: {
...require("daisyui/src/colors/themes")["[data-theme=light]"],
info: "#bfdbfe",
'--accent-2': '#eff6ff',
'--accent-gradient': "linear-gradient(to right bottom, rgba(43, 108, 176, 0.9), rgba(43, 108, 176, 0.9))",
},
dark: {
...require("daisyui/src/colors/themes")["[data-theme=dark]"],
info: "#3b82f6",
'--accent-2': '#2a303c',
'--accent-gradient': `[linear-gradient(180deg,_#eff6ff_50%,_#ffffff_50%)]`
}
}, "retro", "cyberpunk"], |
Beta Was this translation helpful? Give feedback.
Answered by
saadeghi
May 5, 2022
Replies: 1 comment 3 replies
-
No, because a color name in Tailwind CSS is being used in many utility classes. Not just backgrounds. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
saadeghi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No, because a color name in Tailwind CSS is being used in many utility classes. Not just backgrounds.
Color names are generated for text colors, border colors, etc... and many places where it just can't be a gradient. Not the way we use gradient on backgrounds.