How to exclude specific inline CSS?
-
I have enabled JS, CSS and HTML minification, as well as “Also minify inline JS/ CSS?” under HTML.
I have a
<style id="specific-id">.bunch-of-css-already-minified{}</style>inside my pages that I want to exclude.Not to prevent double minification, but because the CSS is “modern” and the minification library that this plugin is using can’t handle it and it literally just deletes all the CSS.
I tried to add the “specific-id” to “Exclude CSS from Autoptimize:” field, but it didn’t exclude.
I tried to add
<style id="specific-id" data-noptimize="1">attribute but it didn’t exclude.I also tried to prepend the comment
/* dont-optimize-this */to the CSS contents and then added “dont-optimize-this” to the “Exclude CSS from Autoptimize” field, but no cigar. Does the field simply not work for inline CSS? What sort of value is it expecting?Any ideas how to exclude?
The topic ‘How to exclude specific inline CSS?’ is closed to new replies.