[WIP] Background gradients #272
Closed
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.
Previous discussion: tailwindlabs/discuss#73
Proposed syntax:
bg-gradient-[x|y]-$color1-to-$color2
I wanted to spike out this feature and quickly realized that making gradients of every color combination was going to generate a lot of CSS (several thousand new rules; realistically <10 would ever be used in a given project). The tests were taking forever to run (presumably due to the much larger fixtures) so it seemed like a good place to stop and reflect on the approach.
A few options I considered:
red-to-blue
, notred-to-red-darker
)red-to-red-dark
,red-to-red-light
, etc but notred-to-blue
,red-to-green
)yellow-to-orange
,yellow-to-green
, etc but notpink-to-green
orblue-to-orange
)white
,black
,transparent
Any thoughts? Maybe there is some other configuration approach that could be taken.
(Test and docs are obviously missing)