Skip to content

Conversation

@kristiankozak
Copy link

Previously, decimal spacing classes such as p-0.5 were incorrectly purged out. This PR fixes this by improving the class detection regex.

More details on the issue:

  • The problem were utility classes that include a period, such as px-0.5 or gap-2.5
  • Such classes were correctly extracted from ERB, but incorrectly parsed out from the tailwind CSS file
  • Because of the leading backslash required in CSS, e.g. the .px-1\.5 class was extracted as px-1 and it's fate was then decided by the purger as such :-)

Not sure if there was any particular reason for handling the period in the previous form of the regex, but this simple change has been working well for me so far.

Thanks for building such an awesome library, removing Webpack was a pleasure!

@dhh dhh merged commit a3ce818 into rails:main Feb 6, 2021
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.

2 participants