• Resolved hungpham

    (@hungpham)


    I recognize that Soliloquy loads its style CSS file at the end. Even I have prioritized my theme CSS to 99999, the theme style is still loaded before Soliloquy. So, if I want to customize sliders, I need to add !important to my theme style.

    Is there any way that I can call Soliloquy before the theme styles?

    Thanks.

    https://ww.wp.xz.cn/plugins/soliloquy-lite/

Viewing 1 replies (of 1 total)
  • Hey!

    If you’re being more specific with your CSS styles than the defaults you’re trying to override you should be able to, in the majority of instances, override the styles without using !important. See http://james.padolsey.com/css/dont-use-important/

    For the few remaining instances where you’re not able to be more specific (rare, you could start out your CSS selector with body to increase specificity, or any other number of selectors for elements containing the actual slider output), if you’re still averse to using the !important declaration to override styles, you should be able to instead simply increase the specificity by chaining classes. For example if your original CSS Selector were:

    .soliloquy-container { }

    You can increase the specificity without using !important as follows:

    .soliloquy-container.soliloquy-container.soliloquy-container { }

    See: http://csswizardry.com/2015/06/subtleties-with-self-chained-classes/
    http://csswizardry.com/2014/07/hacks-for-dealing-with-specificity/ (under ‘Safely increasing specificity’)

Viewing 1 replies (of 1 total)

The topic ‘loading css before the theme css’ is closed to new replies.