Title: Plugin CSS rules override theme rules
Last modified: October 6, 2020

---

# Plugin CSS rules override theme rules

 *  [jenkin27](https://wordpress.org/support/users/jenkin27/)
 * (@jenkin27)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/)
 * Hi, the default style (ie. `css/styles-default.css`) contains UIkit classes (
   ie. `uk-` prefix), but without a plugin-specific namespace. These rules can interfer
   with themes based on UIkit.
 * I suggest you to add a class or an id to plugin-related containers with the `
   surbma-gpga-` prefix.
    -  This topic was modified 5 years, 8 months ago by [jenkin27](https://wordpress.org/support/users/jenkin27/).

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

 *  Plugin Author [Surbma](https://wordpress.org/support/users/surbma/)
 * (@surbma)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13498373)
 * Hi [@jenkin27](https://wordpress.org/support/users/jenkin27/),
 * thank you for your feedback! Is there any theme or website, where it conflicts
   with other CSS?
 *  Thread Starter [jenkin27](https://wordpress.org/support/users/jenkin27/)
 * (@jenkin27)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13498400)
 * It’s a custom theme built on top of UIkit, you can see a preview here: [https://www.openthebox.io/](https://www.openthebox.io/).
   Inspect the buttons on the first blue page section, you can see the plugin css
   overrides our custom style.
 *  Thread Starter [jenkin27](https://wordpress.org/support/users/jenkin27/)
 * (@jenkin27)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13498426)
 * Maybe all `.uk-button` selectors should be in the `#surbma-gpga-modal` context
   using everywhere the selector `#surbma-gpga-modal .uk-button`. The same fix should
   be applied to snackbar.
    -  This reply was modified 5 years, 8 months ago by [jenkin27](https://wordpress.org/support/users/jenkin27/).
 *  Plugin Author [Surbma](https://wordpress.org/support/users/surbma/)
 * (@surbma)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13498738)
 * I see. I’m using UIkit as a framework, generating the css from its less files.
   I will sure make everything to find a solution, but I can not promise anything.
 * Recommended solutions are to “overspecify” your css for these situations or to
   disable my plugin and find another solution for now.
 * I’m sorry, that it is in conflict with your theme!
 *  Thread Starter [jenkin27](https://wordpress.org/support/users/jenkin27/)
 * (@jenkin27)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13498881)
 * Ok, please let me know if and when you will address this issue. Thanks!
 *  Thread Starter [jenkin27](https://wordpress.org/support/users/jenkin27/)
 * (@jenkin27)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13514133)
 * Update: if we put `surbma-gpga-styles` as a dependency in `wp_enqueue_style()`
   of our theme, many issues are fixed.
 * Just a question: what version of UIkit the plugin is using?
 *  Plugin Author [Surbma](https://wordpress.org/support/users/surbma/)
 * (@surbma)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13515414)
 * > if we put surbma-gpga-styles as a dependency in wp_enqueue_style() of our theme,
   > many issues are fixed.
 * Thank you for the update! It makes sense.
 * > Just a question: what version of UIkit the plugin is using?
 * On the front-end, I’m using 2.27.5v.

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

The topic ‘Plugin CSS rules override theme rules’ is closed to new replies.

 * ![](https://ps.w.org/surbma-gdpr-proof-google-analytics/assets/icon-256x256.png?
   rev=1929503)
 * [Surbma | GDPR Proof Cookie Consent & Notice Bar](https://wordpress.org/plugins/surbma-gdpr-proof-google-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/surbma-gdpr-proof-google-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/surbma-gdpr-proof-google-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/surbma-gdpr-proof-google-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/surbma-gdpr-proof-google-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/surbma-gdpr-proof-google-analytics/reviews/)

## Tags

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

 * 7 replies
 * 2 participants
 * Last reply from: [Surbma](https://wordpress.org/support/users/surbma/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/css-rules-override-theme-rules/#post-13515414)
 * Status: not a support question