-
Notifications
You must be signed in to change notification settings - Fork 29
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
Minify CSS class names and ids #69
Comments
Good idea! I guess it might break some pages, so it's better to add it to max preset. Does posthtml-uglify take into account external styles? If not then we should do that on our side. |
No, it only looks at
How would that work? Wouldn't that mean that |
I see a few possible ways:
In an ideal case, we could implement all 3 options and let users configure that themselves how they want this minification work. |
Ouch, completely forgot that this will break external stylesheets. That's a tricky problem to solve.
This seems like a good low-hanging fruit for a first version. I'm also worried that posthtml-uglify seems unmaintained (at least based on PR / issue activity). Taking this into account, I'm now leaning more towards replicating similar functionality in htmlnano (or maybe forking the project?). |
I think it's totally fine to use it. We can always switch htmlnano to a forked version if needed. We could also ask then if @Rebelmail are willing to transfer posthtml-uglify to posthtml namespace. |
You may also want to consider |
This can be done simply by calling posthtml-uglify inside
minifyCss
.Bonus is that it can share the whitelist with uncss if we add uncss per #36.
The text was updated successfully, but these errors were encountered: