Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove invalid gradient fallbacks #14705

Merged
merged 3 commits into from
Oct 17, 2024
Merged

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.

2 participants