Title: Minifying CSS Breaking Flexbox
Last modified: April 6, 2021

---

# Minifying CSS Breaking Flexbox

 *  Resolved [mrwweb](https://wordpress.org/support/users/mrwweb/)
 * (@mrwweb)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/minifying-css-breaking-flexbox/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fminifying-css-breaking-flexbox%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Stoyan Georgiev](https://wordpress.org/support/users/stoyangeorgiev/)
 * (@stoyangeorgiev)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/minifying-css-breaking-flexbox/#post-14296606)
 * Hey there [@mrwweb](https://wordpress.org/support/users/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](https://wordpress.org/support/users/mrwweb/)
 * (@mrwweb)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/minifying-css-breaking-flexbox/#post-14299951)
 * [@stoyangeorgiev](https://wordpress.org/support/users/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](https://wordpress.org/support/users/stoyangeorgiev/)
 * (@stoyangeorgiev)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/minifying-css-breaking-flexbox/#post-14316337)
 * Hey there [@mrwweb](https://wordpress.org/support/users/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](https://wordpress.org/support/users/mrwweb/)
 * (@mrwweb)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/minifying-css-breaking-flexbox/#post-14376116)
 * 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)

The topic ‘Minifying CSS Breaking Flexbox’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

## Tags

 * [minify css](https://wordpress.org/support/topic-tag/minify-css/)

 * 4 replies
 * 2 participants
 * Last reply from: [mrwweb](https://wordpress.org/support/users/mrwweb/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/minifying-css-breaking-flexbox/#post-14376116)
 * Status: resolved