• I see a lot of threads regarding issues or difficulty changing css or color values. Couldn’t you simply remove !important from your CSS code so that theme styles aren’t overridden when trying to customize the icons? I could edit the plugin files, but that should never be an option for something so simple as CSS.

    https://ww.wp.xz.cn/plugins/simple-social-icons/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ron Rennick

    (@wpmuguru)

    Thread Starter gstricklind

    (@gstricklind)

    Hi Ron. Due to the nature of your plugin, I don’t think it’s necessary to use !important (as much).

    You mention:

    – 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

    This may be true for common widget elements, but since your plugin creates and styles its own classes, there shouldn’t a problem or theme conflict.

    Please read on consider this article by a core contributor regarding plugin styles: https://pippinsplugins.com/write-simple-css-in-plugins/

    Plugin Contributor Ron Rennick

    (@wpmuguru)

    This may be true for common widget elements,

    Most of the common widgets use unordered lists which is what Simple Social icons uses.

    It would be rare for a theme to not have unordered lists in sidebars styled differently than an unordered list in the post content. To do that they have to use sidebar specific selectors to target the widgets.

    In other words, nearly every theme has more specific styling for the unordered lists in widgets.

    Please read on consider this article by a core contributor

    I’m a core contributor as well https://core.trac.ww.wp.xz.cn/search?q=wpmuguru&noquickjump=1&changeset=on

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

The topic ‘Remove !important from plugin CSS’ is closed to new replies.