Title: Mobile CSS Code
Last modified: September 18, 2020

---

# Mobile CSS Code

 *  Resolved [wfinley](https://wordpress.org/support/users/wfinley/)
 * (@wfinley)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/mobile-css-code/)
 * This question is similar to one posted a few months back. See:
    [https://wordpress.org/support/topic/autoptimize-breaks-my-mobile-theme/](https://wordpress.org/support/topic/autoptimize-breaks-my-mobile-theme/)
 * In short… when I aggregate my CSS code the mobile theme breaks. If I check optimize
   and doin’t check aggregate then it works fine – but if I check both the media
   queries for mobile don’t properly load.
 * Suggestions? Is this due to some media query somewhere not being properly closed
   or something? Any ideas or should I just leave aggregate unchecked.
 * Thx.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmobile-css-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/mobile-css-code/#post-13426765)
 * OK, in the CSS optimization exclusion field, can you try excluding one of below
   each line and report back?
 * * `wp-content/themes`
    * OR `wp-content/plugins` * OR `wp-includes/js`
 *  Thread Starter [wfinley](https://wordpress.org/support/users/wfinley/)
 * (@wfinley)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/mobile-css-code/#post-13435215)
 * Thx. The issue went away when I included wp-content/themes. I’m assuming that’s
   due to some improperly coded class somewhere in the themes style?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/mobile-css-code/#post-13435229)
 * could be. could also be a question of order of stylesheets changed as AO aggregates
   per media-attribute.
 * what you can now do is check the HTML source, lookcing for CSS-files that are
   in `wp-content/themes/` and try excluding one (or more) file(s) specifically 
   instead of bluntly excluding all. this does involve some trial & error, but the
   more specific the exclusion the smaller the impact on performance?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/mobile-css-code/#post-13527861)
 * No feedback any more so I assume this got resolved wfinley ? Feel free to follow
   up if you still encounter issues!
 * have a nice day!
    frank

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

The topic ‘Mobile CSS Code’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/mobile-css-code/#post-13527861)
 * Status: resolved