radial-gradient support #2599
Replies: 13 comments 25 replies
-
Hey @surjithctly! You can add radial gradients yourself if you like by adding them to the https://tailwindcss.com/docs/background-image#customizing module.exports = {
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--gradient-color-stops))',
}
}
}
} Here's a demo: |
Beta Was this translation helpful? Give feedback.
-
Yes, plugin requires Tailwind CSS 1.2 or later. If your project uses an older version of Tailwind, you should install the latest 2.x version of this plugin. |
Beta Was this translation helpful? Give feedback.
-
In case someone missed it: In Tailwind 2.x the CSS variable name seems to have changed. So now you'd add radial gradients via:
|
Beta Was this translation helpful? Give feedback.
-
Is there a way to set gradient as background color? If I want to use it in combination with mix blend, it doesn't work <div class="bg-gradient-radial from-yellow-400 to-gray-9000">
<div class="mix-blend-multiply bg-some-svg"></div>
</div> PS: I also tried |
Beta Was this translation helpful? Give feedback.
-
It would also be nice to support conic gradients as well. See #6087 for implementation and example. |
Beta Was this translation helpful? Give feedback.
-
Tailwind 3 compatible:
|
Beta Was this translation helpful? Give feedback.
-
Anyone else having issues with webpack builds failing, when using this exact extend?
|
Beta Was this translation helpful? Give feedback.
-
So now how do you create arbitrary I tried with just adding a custom color in the config and you can't because |
Beta Was this translation helpful? Give feedback.
-
The same question. |
Beta Was this translation helpful? Give feedback.
-
What is the easiest way to express this in <div
className={`absolute w-[calc(50%-1px)] aspect-square rounded-tl-full origin-bottom-right rotate-45 transform-gpu bg-default opacity-50 flex items-center justify-center`}
style={{
WebkitMaskImage: 'radial-gradient(circle farthest-side at bottom right, transparent 40%, #000 40%)',
mask: 'radial-gradient(circle farthest-side at bottom right, transparent 40%, #000 40%)',
}}
>
<ChevronUpIcon className='h-6 w-6 -rotate-45 transform-gpu' />
</div> |
Beta Was this translation helpful? Give feedback.
-
Hey folks, give this a try! backgroundImage: {'gradient-radial': 'radial-gradient(circle, var(--tw-gradient-from), var(--tw-gradient-to))'} |
Beta Was this translation helpful? Give feedback.
-
Create the custom styles you want in the Tailwind CSS configuration file |
Beta Was this translation helpful? Give feedback.
-
And how to express multiple gradients in <div
className='flex flex-1 flex-col bg-[length:20px_20px] bg-repeat'
style={{
backgroundImage:
'linear-gradient(to bottom, transparent 19px, rgba(255, 255, 255, 0.1) 20px), linear-gradient(to right, transparent 19px, rgba(255,
255, 255, 0.1) 20px)',
}}
/> |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Can tailwindcss support radial-gradient?
I'd love to see it.
Beta Was this translation helpful? Give feedback.
All reactions