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

Slim template regression with v3.4.5 #14005

Closed
ledermann opened this issue Jul 16, 2024 · 3 comments
Closed

Slim template regression with v3.4.5 #14005

ledermann opened this issue Jul 16, 2024 · 3 comments

Comments

@ledermann
Copy link

What version of Tailwind CSS are you using?

v3.4.5

What build tool (or framework if it abstracts the build tool) are you using?

postcss-cli 8.4.39 (but IMHO not relevant here)

What version of Node.js are you using?

v20.9.0

What browser are you using?

Not relevant

What operating system are you using?

macOS (but not relevant)

Reproduction URL

Because the bug belongs to Pug or slim, play.tailwindcss.com cannot be used to build an example. I will send a PR to fix, please don't close this issue.

Describe your issue

After upgrading my Rails application (using Slim templates) to Tailwind CSS v3.4.5, I found a regression that some classes are not generated anymore. Example:

.bg-green-300.2xl:bg-red-300
  '(Look mom, no closing tag!)

The class 2xl:bg-red-300 is missing. It seems this happens because #13959 uses an invalid number check.

Stay tuned, I'm working on a PR to fix this.

ledermann added a commit to ledermann/tailwindcss that referenced this issue Jul 16, 2024
A class name starting with number like `2xl:bg-red-500` must not be removed.

Resolves tailwindlabs#14005
ledermann added a commit to solectrus/solectrus that referenced this issue Jul 16, 2024
thecrypticace pushed a commit that referenced this issue Jul 16, 2024
A class name starting with number like `2xl:bg-red-500` must not be removed.

Resolves #14005
@thecrypticace
Copy link
Contributor

fix released in v3.4.6 -- thanks!

@Skulli
Copy link

Skulli commented Jul 17, 2024

I have a similar problem (in haml) with the class xl:col-span-2 in the line .xl:col-span-2.xl:pr-8. With 3.4.5 and 3.4.6 the col-span-2 class is not extracted. Can open a new issue, if required.

@ledermann
Copy link
Author

@Skulli I just tried your example in the test suite of tailwindcss v3.4.6 and it works fine. Both classes are extracted. So it seems to be a different thing, maybe your example is not complete. I suggest creating a new issue with a minimal failing example.

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

No branches or pull requests

3 participants