Support » Plugin: SiteGround Optimizer » Minifying CSS Breaking Flexbox

  • Resolved mrwweb

    (@mrwweb)


    I have the following CSS in my theme’s style.css file:

    .main-navigation .search form input,
    .main-navigation .search form button {
    	min-width: 0;
    	width: 0;
    	flex: 1 1 auto;
    }
    .main-navigation .search form input {
    	flex: 3 1 auto;
    }

    When the Minify CSS setting is on, that seems to be changed to this:

    .main-navigation .search form input,
    .main-navigation .search form button {
    	min-width:0;
    	width:0;
    	flex:auto
    }
    .main-navigation .search form input {
    	flex:initial
    }

    I would expect a “Minification” setting to only reformat my text (I would include dropping trailing ; in that definition) but never change my syntax. Having discovered this, I’m suddenly hesitant to use this setting any more. Please explain and ideally fix this issue.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Stoyan Georgiev

    (@stoyangeorgiev)

    Hey there @mrwweb,

    I am afraid there isn’t much we can do right away about it.
    We are using a minification binary on the server to save client resources while generating the minified files.

    I will report that issue and once it is fixed, the new minify will be applied on all SG servers.

    Kind regards,
    Stoyan

    Thread Starter mrwweb

    (@mrwweb)

    @stoyangeorgiev Thanks for your reply. If what I observed means that the minification library does more than remove whitespace and reformat code, then I think the option in the plugin should also be renamed, ideally with a link to details about how it works. If I knew what library you were using, I could at least try to work around the issue.

    Plugin Author Stoyan Georgiev

    (@stoyangeorgiev)

    Hey there @mrwweb,

    The minification library will be updated tomorrow, so you can test it out. Any feedback will be highly appreciated. If you still have any issues, feel free to reach back to us!

    Kind regards,
    Stoyan

    Thread Starter mrwweb

    (@mrwweb)

    Just turned on CSS minification and the issue now seems to be resolved. Thanks for getting this fixed!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.