mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
%w syntax in Slim pre processing (#17557)
This PR fixes an issue where the Ruby `%w[…]` syntax causes utilities to not be properly extracted. This PR will now ensure that it does get extracted correctly. Given this input: ```slim div[ class=%w[bg-blue-500 w-10 h-10] ] div[ class=%w[w-10 bg-green-500 h-10] ] ``` Before this PR, we extracted everything but the `bg-blue-500`. The `w-10` was extracted but not because of the second div, but because of the first one. Fixes: #17542 ## Test plan 1. Added a test to ensure it's working correctly. Looking at the extractor tool, you can see that it now gets extracted correctly. Top is before, bottom is with this change. <img width="1199" alt="image" src="https://github.com/user-attachments/assets/028d9abd-8917-438c-a423-88ba887b7f97" />
A utility-first CSS framework for rapidly building custom user interfaces.
Documentation
For full documentation, visit tailwindcss.com.
Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
Discuss Tailwind CSS on GitHub
For chatting with others using the framework:
Join the Tailwind CSS Discord Server
Contributing
If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.
Description
Languages
JavaScript
90.6%
CSS
7.6%
HTML
1.7%