Skip to content
Discussion options

You must be logged in to vote

Tailwind CSS v4 already supports custom utilities through @utility, so you can create a custom bg-mosh utility yourself:

@utility bg-mosh {
  background-image: radial-gradient(var(--tw-gradient-stops));
}

Then use it like:

<div class="bg-mosh from-red-500 via-slate-400 via-40% to-blue-300 to-90%">

However, Tailwind does not currently provide a built-in mechanism for defining a new gradient type that automatically integrates with its existing from-*, via-*, to-*, and stop-position utilities in the same way as bg-linear-*, bg-radial, and bg-conic-*.

So the proposed feature would be about making the existing gradient-stop system extensible to custom gradient types, rather than simply adding …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@biggerdreamactive

This comment was marked as off-topic.

Answer selected by ANTIPIMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants