Support » Plugin: MetaSlider » !important in public.css makes it very difficult to overwrite

  • Resolved Edward

    (@kamiyeye)


    I was able to customize the navigation arrows in my theme style.css:

    .flex-direction-nav .flex-prev {
      content:"\f3d5" !important;
      font-family: "icon font";
      ...
    }

    By updating to the latest version, it becomes impossible due to the new code in public.css

    .metaslider .flexslider .flex-direction-nav li a::before {
        content: none !important;
    }

    Already public.css is loaded in the footer, that makes it very hard to overwrite a !important rule, the theme style.css wouldn’t work, Additional CSS section in Customizer wouldn’t work. Finally I had to create a separate css file and made it loads after public.css to fix the style of my navigation arrows.

    I think header is a better place for public.css, but if it has to be in the footer, then !important rules should be used with caution. Unfortunately, it seems there are more and more !important added to public.css?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor kbatdorf

    (@kbat82)

    Hi @kamiyeye,

    Thanks for the feedback. I Had to add that rule to override FlexSlider’s default styles and some aggressive themes that add stuff there.

    The trick is to just be more specific. The quick and dirty way is to prepend body to the rule. This should do the trick.

    body .metaslider .flexslider .flex-direction-nav li a::before {
      content:"\f3d5" !important;
      font-family: "icon font";
    }
    Plugin Contributor kbatdorf

    (@kbat82)

    Hi @kamiyeye,

    I’ll mark this as resolved since we didn’t hear back from you please open a new issue if you have any more problems. By the way, if you’re enjoying the MetaSlider plugin please leave us a 5-star review. They really help us out. Thanks!

    https://wordpress.org/support/plugin/ml-slider/reviews#new-post

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘!important in public.css makes it very difficult to overwrite’ is closed to new replies.