Skip to content

Conversation

@adamwathan
Copy link
Member

Prior to this PR we were providing fallback values for certain CSS variables in our gradient utilities that just weren't necessary and didn't do anything.

For example bg-linear-to-r was generating this:

.bg-linear-to-r {
  --tw-gradient-position: to right;
  background-image: linear-gradient(
    var(--tw-gradient-stops, to right)
  );
}

…but background-image: linear-gradient(to right) is not valid CSS and is thrown out by the browser.

This PR removes these fallback values entirely since there is nothing sensible to fall back to anyways — you need to combine these utilities with the from-*/to-* utilities or provide the complete gradient as an arbitrary value for things to make sense.

@adamwathan adamwathan requested a review from a team as a code owner October 17, 2024 15:15
@adamwathan adamwathan merged commit feeb9f1 into next Oct 17, 2024
1 check passed
@adamwathan adamwathan deleted the fix/remove-bad-gradient-fallbacks branch October 17, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants