purgecss
purgecss copied to clipboard
Blocklist option does not work for pseudo selectors/elements only
Is your feature request related to a problem? Please describe.
I can't figure out how to remove CSS for pseudo selectors/elements with blocklist
option.
Describe the solution you'd like. A way to remove CSS for pseudo selectors/elements while preserving CSS for "parent" element itself.
E.g.:
- remove:
.my-class::before
,.my-class::after
- preserve:
.my-class
Describe alternatives you've considered. None.
Additional context.
I'm using Bulma and I want to remove ::before
and ::after
pseudo selectors/elements (used to create close icon by Bulma ) from CSS, because I want to use custom icon, while I want preserve CSS for "parent" element itself.
Thanks.
Actual use case (I bumped into this today) I have a super-small landing page that uses boostrap 5 That page has form (so I actively include bootsstrap forms module) but It only has chckboxes and text inputs. Bootstrap produces a significant number (in comparison to overall size of the output in my case) of selectors to manage file inputs, date inputs etc:

Those are in bootstrap's _form-control.scss
so I can't exclude them on Sass level without loosing those parts I need
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Bump.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Bump.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Bump.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Bump.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.