No description
This PR handles template toolkit syntax as a pre-processor step such that `%]` and `[%` are seen as valid boundary characters. This is handled for the `.tt`, `.tt2` and `.tx` file extensions. It's not handled if this syntax is used in `.html` files because then everybody pays a pre processor cost even if you don't need this syntax in most cases. This now ensures that a `template.tx` like this: ```html <div class="[% IF $is_open %]bg-white/40[% ELSE %]bg-white/10[% END %]"></div> <!-- ^^^^^^^^^^^ ^^^^^^^^^^^ --> ``` Extracts the classes in between those conditions correctly. This also fixes a small issue related to Maud, a template engine for Rust where conditionals like `p.text-black[condition]` caused the `text-black` class not to be extracted. This is fixed as part of this PR because it was commented on the linked issue. Fixes: #20233 ## Test plan 1. Added a new extractor 2. Added regression tests 3. All existing tests pass |
||
|---|---|---|
| .github | ||
| crates | ||
| integrations | ||
| packages | ||
| patches | ||
| playgrounds | ||
| scripts | ||
| .gitignore | ||
| .prettierignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| rust-toolchain.toml | ||
| turbo.json | ||
| vitest.config.ts | ||
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 feature ideas:
Discuss Tailwind CSS on GitHub
Contributing
If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.