Skip to content
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

incorrectly removes whitespace before CSS wildcard selector #1127

Open
dwhieb opened this issue Apr 18, 2022 · 0 comments
Open

incorrectly removes whitespace before CSS wildcard selector #1127

dwhieb opened this issue Apr 18, 2022 · 0 comments

Comments

@dwhieb
Copy link

dwhieb commented Apr 18, 2022

In Elad Shechter's new CSS reset, he uses the following lines of CSS:

*:where(:not(iframe, canvas, img, svg, video):not(svg *)) {
  all: unset;
  display: revert;
}

html-minifier converts :not(svg *) to :not(svg*), which is invalid CSS and prevents the rule from being applied.

I've confirmed that this error is not caused by clean-css—it's caused by html-minifier.

I haven't been able to find any setting in html-minifier that I can adjust to fix this, except to use ignoreCustomFragments, which seems hacky.

It seems like html-minifier should not be removing whitespace in this instance.

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

No branches or pull requests

1 participant