No internet connection
  1. Home
  2. Support

css minify

By @fakeyou2020-02-20 15:42:41.822Z

My Theme has a minified CSS, if it is processed by WP2Static it is no longer minified.
Example:
html{height:100%}body{margin:0;padding:0;font-family:Geneva,sans-serif,Tahoma;text-shadow:0 1px 1px rgba(255,255,255,.33);height:100%}a{color:#000}#showli:hover{opacity:1}#emailkopf:hover{width:300px;height:170px;z-index:300;background:none repeat scroll 0 0 rgba(255,255,255,1);box-shadow:8px 8px 8px #666}
Becomes:
html {height: 100%;} body {margin: 0;padding: 0;font-family: Geneva,sans-serif,Tahoma;text-shadow: 0 1px 1px rgba(255,255,255,.33);height: 100%;} a {color: #000;} #showli:hover {opacity: 1;} #emailkopf:hover {width: 300px;height: 170px;z-index: 300;background: none repeat scroll 0 0 rgba(255,255,255,1);box-shadow: 8px 8px 8px #666;}
Spaces and Line breaks were inserted
what can I do to prevent this?
Thanks in advance. Thanks for working on this plugin

  • 2 replies
  1. M
    Matt Moore @mattsmartamusltd2020-03-11 22:32:38.280Z

    I'm also having this issue. Tried using autoptimise, and whilst it does generate the css files, they are not minified. I then tried using wp fast velocity minify, and when browsing the wordpress site, the css files are minified, but when I deploy my site, it creates an un-minified version, just like autoptimise. I've disabled the "Don't minify or logged in users" just incase that was an issue, but I have no other solutions. Please help!

    1. In reply tofakeyou:
      Leon Stafford @leonstafford2020-03-13 16:05:48.025Z

      Hi @mattsmartamusltd and @fakeyou,

      Please try the latest alpha release of V7, should not get any funkiness with these assets, but please let me know any issues you face:

      https://github.com/WP2Static/wp2static/releases/tag/7.0-alpha-003

      Cheers,

      Leon