mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
This PR fixes an issue where `theme(…)` calls that contain a `.1` weren't correctly converted to `var(--spacing-1)`. The reason for this is that `.1` has some special meaning in cases like `fontSize.xs.1.lineHeight` where it should be converted to `--font-size-xs--line-height`, not `--font-size-xs-1-line-height`. To solve this, we make sure to only apply the `--` check if the `1` occurs somewhere in the middle instead of at the very end. With this change, the following migrations will happen correctly: ```diff - [--value:theme(spacing.1)] + [--value:var(--spacing-1)] ``` ```diff - [--value:theme(fontSize.xs.1.lineHeight)] + [--value:var(--font-size-xs--line-height)] ``` --------- Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
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.