searchturbine / phpwee-php-minifier

Open-source (BSD) PHP inline minifier functions for HTML, XHTML, HTML5, CSS 1-3 and Javascript. http://searchturbine.com/php/phpwee
Other
79 stars 46 forks source link

Bug - crashes with WordPress CSS #24

Open lautiamkok opened 6 years ago

lautiamkok commented 6 years ago

It has bugs obviously. It removes all CSS styles you embed or via WordPress system, e.g.:

<style type="text/css" media="screen">
    html { margin-top: 32px !important; }
    * html body { margin-top: 32px !important; }
    @media screen and ( max-width: 782px ) {
        html { margin-top: 46px !important; }
        * html body { margin-top: 46px !important; }
    }
</style>
        <style type="text/css" id="wp-custom-css">
            /*
You can add your own CSS here.

Click the help icon above to learn more.
*/

.row.row-banner-notice {
   background-color: #000;
}       </style>

The styles above are removed.

How can we fix this?

ashucg commented 6 years ago

@lautiamkok is this CSS coming from your theme or any plugin?

lautiamkok commented 6 years ago

@ashucg it is coming from wp_custom_css_cb() https://developer.wordpress.org/reference/functions/wp_custom_css_cb/

no plugins.

ashucg commented 6 years ago

@lautiamkok thanks for the information. I will take a look at this issue ASAP.

ashucg commented 6 years ago

@lautiamkok this repository is not maintained and is not RC4-compatible which is why you are facing this issue, @Musiksammler has already forked and updated the code to make it RC4-compatible is is working fine with your css.