Title: Plugin removes CSS media attribute
Last modified: November 26, 2024

---

# Plugin removes CSS media attribute

 *  Resolved [WPExplorer](https://wordpress.org/support/users/wpexplorer/)
 * (@wpexplorer)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-removes-css-media-attribute/)
 * It looks like your CSS minify & combine functions both remove the `media` attribute
   from CSS files. In my [Total theme](https://totalwptheme.com/), I rely on the`
   media` attribute to include two separate CSS files that manage the mobile menu
   breakpoint. When your plugin combines and/or minifies the files it strips the`
   media` attribute. This causes the main menu and mobile menus to disappear and
   introduces other design problems.
 * Please see this screenshot: [https://a.cl.ly/xQukPzAm](https://a.cl.ly/xQukPzAm)
 * While I don’t personally use your plugin (though I do recommend it), I’ve had
   many customers report this issue in the past.
 * I would greatly appreciate it if you could update the plugin to ensure it respects
   the `media` attribute specified in the CSS files (a core parameter of `wp_register_style`).
   This change would help avoid a lot of unnecessary headaches for both me and your
   users.
 * Additionally, it would be good if your fields used to exclude CSS/JS files could
   accept script handle names. It would keep the data inside the field much slimmer
   and also it makes more sense to exclude by handle then path.
 * Thank you!
    - AJ

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-removes-css-media-attribute/#post-18161723)
 * Hello [@wpexplorer](https://wordpress.org/support/users/wpexplorer/)
 * Thank you for reaching out and I am happy to help!
 * Thank you for taking the time to report this. Can you pelase let me know if any
   of your demo themes can be used for teting purposes in this case?
   Also, can you
   please sahre the information which CSS minifier was used in this case?
 * Once again Thank you for ttaking the time to share this and I’ll share this with
   the team for testing
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Plugin removes CSS media attribute’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-removes-css-media-attribute/#post-18161723)
 * Status: resolved