How to exclude specific inline CSS?

[ad_1]

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?

  • This topic was modified 1 hour, 47 minutes ago by websevendev.
  • This topic was modified 1 hour, 46 minutes ago by websevendev.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer