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

Ensure --spacing-* variables take precedence over --container-* variables #15180

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

adamwathan
Copy link
Member

Fixes #15146.

This PR updates the w-*, max-w-*, min-w-*, and basis-* utilities to make sure that --spacing-* values are preferred over --container-* values when there is a conflict.

Given this theme configuration:

@theme {
 --spacing-sm: 8px;
 --container-sm: 256px;
}

…utilities like max-w-sm will use 8px instead of 256px after this change.

Users can still be explicit about the value they want to use if they've introduced a naming collision like this by using our variable shorthand like max-w-(--container-sm).

@adamwathan adamwathan requested a review from a team as a code owner November 25, 2024 21:32
@adamwathan adamwathan merged commit a022905 into next Nov 26, 2024
1 check passed
@adamwathan adamwathan deleted the fix/prefer-spacing-to-container branch November 26, 2024 14:45
@wongjn wongjn mentioned this pull request Dec 9, 2024
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.

[v4] Problem with custom spacing - v4 is referencing var(--container-*) instead of var(--spacing-*)
2 participants