purgecss icon indicating copy to clipboard operation
purgecss copied to clipboard

Blocklist option does not work for pseudo selectors/elements only

Open oliverfindl opened this issue 2 years ago • 3 comments

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.

oliverfindl avatar May 20 '22 16:05 oliverfindl

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:

Screenshot 2022-06-20 at 11 28 05

Those are in bootstrap's _form-control.scss so I can't exclude them on Sass level without loosing those parts I need

jrencz avatar Jun 20 '22 09:06 jrencz

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.

github-actions[bot] avatar Sep 19 '22 00:09 github-actions[bot]

Bump.

oliverfindl avatar Sep 19 '22 16:09 oliverfindl

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.

github-actions[bot] avatar Dec 20 '22 00:12 github-actions[bot]

Bump.

oliverfindl avatar Dec 20 '22 07:12 oliverfindl

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.

github-actions[bot] avatar Mar 22 '23 00:03 github-actions[bot]

Bump.

oliverfindl avatar Mar 22 '23 19:03 oliverfindl

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.

github-actions[bot] avatar Jun 22 '23 00:06 github-actions[bot]

Bump.

oliverfindl avatar Jun 23 '23 10:06 oliverfindl

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.

github-actions[bot] avatar Dec 22 '23 00:12 github-actions[bot]