-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Start/end ignore comments not detected when they don't precede a rule #90
Comments
Ok, turns out the problem is not that it's the first line in the file. It's that the "node" that follows isn't a rule. Looks like the "ignore" comments are only detected when they precede a rule, which makes sense for the standard |
I have the same issue. I'm trying to ignore EDIT: My bad. After digging a bit more, I found out my |
I'm having troubles getting whitelisting to work as well. As I'm using Rails and its helpers to output the input tags (so the html tags are not inside the html-markup), css input rules will (obviously) get purged. So, first I tried using the "whitelist" option. However, setting it up like Then I tried to use the inline ignore and noticed a problem with that as well: only the "next rule" option works. So I made a testcase:
outputs
PS: I'm using Grunt, in a chain like this sass > postcss > string-replace > purgecss. I renamed all output files differently (not overwriting a single tmp file). So I can actually see that the ignore rules are fed correctly to purgecss (which is the case). So the fault somehow must be on purgecss end, at least from what I figured out. If any more information is required from my setup to trace the bug(s), please let me know. |
Hi, i have the same issue with |
@Remeic Just ran into this. My issue was that cssnano was running before PurgeCSS and stripping out comments. |
add ! after /* These works on webpack 4
I read on cssnano docs on how to preserve the comments https://cssnano.co/optimisations/discardcomments/ |
@viperfx07 thanks a lot I was about to whitelist my resets 😅 |
I'm Migrating from Bootstrap vue to Tailwind, the thing is that when I run build command, the site seems to be good but the notifications doesn't have any style. When a Notification is needed, this notification appears in the bottom of the page and doesn't have Styles, just plain text. I tried to ignore bootstrap-vue styles adding
I don't know if it has something to do but I'm Using SCSS. The only solution I found for now was put a notification directly in the HTML inside a Div with "display: none", it works, but is not a good solution. |
I solved this issue, In this case this is my "gulp" function for the task:
I change the position of the .pipe for the purgecss function to the top and it's solved the problem:
Hope you find this solution helpfull |
I'm still experiencing this issue and I'm not using cssnano. /* purgecss start ignore */ doesn't appear to do a thing. Even if I add a !. This makes it impossible for me to use purgecss. Has anyone found a real solution? |
First of all, thank you so much for developing my feature request (#66). It works great in most cases, but I just found an issue with it. It seems the
/*! purgecss start ignore */
comment is ignored if it's the first line in the CSS file, so the block isn't ignored. I'm using Laravel Mix with thelaravel-mix-purgecss
plugin. Let me know if you need any more information. Thank you!The text was updated successfully, but these errors were encountered: