Add gradient color stop position utilities #10886
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds new gradient color stop position utilities that can be used in combination with the existing gradient color stop colors.
As an example, this looks like:
This can be achieved using the new
from-{position}
,via-{position}
andto-{position}
classes. They are all optional and can be used together as well.By default the following classes can be used:
from-0%
via-0%
to-0%
from-5%
via-5%
to-5%
from-10%
via-10%
to-10%
from-15%
via-15%
to-15%
from-20%
via-20%
to-20%
from-25%
via-25%
to-25%
from-30%
via-30%
to-30%
from-35%
via-35%
to-35%
from-40%
via-40%
to-40%
from-45%
via-45%
to-45%
from-50%
via-50%
to-50%
from-55%
via-55%
to-55%
from-60%
via-60%
to-60%
from-65%
via-65%
to-65%
from-70%
via-70%
to-70%
from-75%
via-75%
to-75%
from-80%
via-80%
to-80%
from-85%
via-85%
to-85%
from-90%
via-90%
to-90%
from-95%
via-95%
to-95%
from-100%
via-100%
to-100%
They also accept arbitrary values if you want even more control of the actual value: