Replies: 1 comment 1 reply
-
CSS rules remaining in the output CSS after their corresponding classes are removed is expected with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a strange one to me. I have
npx tailwindcss -i src/input.css -o src/output.css --watch
going, and with the followingtailwind.config.js
:When I add classes to my HAML layout file, they show up in the output CSS... but when I remove the same said classes, they do not disappear from the output CSS. That is, unless and until I restart
npx tailwindcss ... --watch
. I'm guessing this isn't expected behaviour?ALSO: how do I find the regular expressions that tailwindcss is using? I am not entirely sure how much support there is for HAML. I was hopeful, given that I was able to have the added classes show up... but the reverse not happening is puzzling. I'm hoping to be able to find the actual regular expressions to be able to confirm the support (hopefully) for myself, but I am not able to see anything in Tailwind's default configuration (link from Tailwind's docs/configuration). https://tailwindcss.com/docs/content-configuration#class-detection-in-depth mentions regular expressions... but stops short of actually giving you the actual regexes... or pointing you to where they might be found.
My simple test
views/layout.haml
:Here's a sequence of the state of things:
grep -E '(container|text-2xl|text-3xl)' src/output.css
gives no results%body
->%body.container.text-2xl
:.container
and.text-2xl
show up in the output css%body.container.text-2xl
->%body.container.text-3xl
:.text-3xl
shows up in the output css (which is fine), but.text-2xl
remains and does not disappear%body
with no classesall 3 classes that I previously added remain in the output css:
.container
,.text-2xl
,.text-3xl
all 3 classes disappear from the output css
Beta Was this translation helpful? Give feedback.
All reactions