Title: Removing plugin&#039;s CSS
Last modified: August 21, 2016

---

# Removing plugin's CSS

 *  Resolved [Sridhar Katakam](https://wordpress.org/support/users/srikat/)
 * (@srikat)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/removing-plugins-css/)
 * I am looking for a way to dequeue the plugin’s CSS as the presence of !important
   is creating issues in being able to fully customize via custom CSS.
 * I tried adding [this](https://gist.github.com/fatmedia/7116230) code but it results
   in a fatal error.
 * Does anyone have ideas other than directly editing the plugin’s CSS file or forking
   it?
 * [http://wordpress.org/plugins/simple-social-icons/](http://wordpress.org/plugins/simple-social-icons/)

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

 *  Thread Starter [Sridhar Katakam](https://wordpress.org/support/users/srikat/)
 * (@srikat)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/removing-plugins-css/#post-4408510)
 * Got it.
 *     ```
       add_action( 'wp_enqueue_scripts', 'sk_disable_simple_social_icons_styles', 11 );
       function sk_disable_simple_social_icons_styles() {
   
       	if ( class_exists( 'Simple_Social_Icons_Widget' ) ) {
   
       		/** Dequeue icon styles */
       		wp_dequeue_style( 'simple-social-icons-font');
   
       	}
   
       }
       ```
   
 * Got help in IRC.
 *  Plugin Contributor [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/removing-plugins-css/#post-4408558)
 * I saw your blog post via a retweet from Carrie Dils. Near the end you said
 * > If there is another reason I do not know of, I would love to be educated.
 * The reason you will find !important used in widget CSS by plugin authors is
 * – the markup around the widget is dependent on the theme
    – common widget elements
   are given default styling by the theme – in many instances the default styling
   has a more specific selector
 * Ergo, the only recourse a plugin author has to ensure the widget is styled approximately
   correctly is using the !important.
 * The third option you weren’t aware of when you wrote the post is use a more specific
   selector in your style.css. Because you have a Genesis child theme that selector
   would be
 *     ```
       .site-container .sidebar .simple-social-icons ul li {
           margin-left: 10px !important;
           margin-right: 10px !important;
       }
       ```
   
 *  Thread Starter [Sridhar Katakam](https://wordpress.org/support/users/srikat/)
 * (@srikat)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/removing-plugins-css/#post-4408601)
 * Thank you Ron.
 *  [Gary Jones](https://wordpress.org/support/users/garyj/)
 * (@garyj)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/removing-plugins-css/#post-4408834)
 * Ron, that is totally the wrong reason for using `!important`. Even as far back
   as 2010, better reasons were given for using it: [http://www.smashingmagazine.com/2010/11/02/the-important-css-declaration-how-and-when-to-use-it/](http://www.smashingmagazine.com/2010/11/02/the-important-css-declaration-how-and-when-to-use-it/)
 * Any CSS in plugins should defer to styles in the theme, not try and mandate the
   styles with important. The class selector `.simple-social-icons ul li` is already
   going to be scoped enough for many cases to target just the list items inside
   the relative widget. Anything else is up to the theme author.
 * You shouldn’t try and force a “plug and go” approach on something with front-
   end output using `!important`, since that then forces theme customisers to employ
   crappy code to get around yours.

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

The topic ‘Removing plugin's CSS’ is closed to new replies.

 * ![](https://ps.w.org/simple-social-icons/assets/icon.svg?rev=3358424)
 * [Simple Social Icons](https://wordpress.org/plugins/simple-social-icons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-social-icons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-social-icons/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-social-icons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-social-icons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-social-icons/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [dequeue](https://wordpress.org/support/topic-tag/dequeue/)
 * [Plugin CSS](https://wordpress.org/support/topic-tag/plugin-css/)

 * 4 replies
 * 3 participants
 * Last reply from: [Gary Jones](https://wordpress.org/support/users/garyj/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/removing-plugins-css/#post-4408834)
 * Status: resolved