Skip to content

Disable padding in @source inline(…) brace expansion #17491

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

philipp-spiess
Copy link
Member

@philipp-spiess philipp-spiess commented Apr 1, 2025

Closes #17492

The padding code we had was incorrect as it would always pad on the largest string representation. So for an input like this:

@source inline("z-{10..100..10}");

It would create the following candidates:

  • z-010
  • z-020
  • z-030
  • z-040
  • z-050
  • z-060
  • z-070
  • z-060
  • z-070
  • z-100

Instead of fixing the padding logic we realized that Tailwind utilities don't need padding at all so this PR removes this feature

Test plan

  • Added the following to the Vite playground: @source inline("z-{10..100..10}");
  • Ensure it works:
    image

@philipp-spiess philipp-spiess requested a review from a team as a code owner April 1, 2025 20:46
@philipp-spiess philipp-spiess merged commit b069d7a into main Apr 1, 2025
7 checks passed
@philipp-spiess philipp-spiess deleted the fix/expand-padding branch April 1, 2025 20:55
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.

@source inline(…) incorrectly pads number values for unequal significant number ranges
2 participants