Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

[src=''] becomes [src] #54

Closed
kurtextrem opened this issue Oct 27, 2018 · 2 comments
Closed

[src=''] becomes [src] #54

kurtextrem opened this issue Oct 27, 2018 · 2 comments

Comments

@kurtextrem
Copy link

kurtextrem commented Oct 27, 2018

version: 1.3.1

Behavior:
The PurgeCSS plugin 'minifies' img[src=''] to img[src] for whatever reason. This breaks functionality, as the latter matches every img element with a src attribute. The first one only empty ones.

Expected:
img[src=''] stays the way it is.

However, this only happens, when the CSS is minified beforehand (with csso/clean-css/cssnano) (if I remove the minifier, this issue is gone, however if I only turn on the minifier without PurgeCSS, the issue is gone too - so PurgeCSS is faulty)

@kurtextrem
Copy link
Author

And this also happens if I wrap the css in /* purgecss start ignore */.

@kurtextrem
Copy link
Author

FullHuman/purgecss#100

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant