Do I really need to !important all the things?

Home Forums Calendar Products Events Calendar PRO Do I really need to !important all the things?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1148277
    Brian
    Participant

    I’m trying to override the styles on the advanced list widget. I’ve created a widget-calendar.css in my child theme, and I’ve added my override to it. I can even see it when I inspect the page, but the default CSS from the plugin is being applied after and overriding my style.

    Of course I can fix it with !important, but it feels like the custom CSS should be applied after the default so I don’t need to !important everything I want to change.

    Am I missing something?

    #1148284
    Geoff
    Member

    Hey Brian,

    Ha! We love that picture around here and use it often in our internal chats. 🙂

    Using !important is sometimes necessary, especially when there are many stylesheets fighting for precedence in the cascade of things. However, it shouldn’t always be needed.

    I do know that the Avada theme you are using already includes a ton of it’s own styling customizations to The Events Calendar, so even though you have properly overridden the widget styles in your child theme, it’s quite possible that there is an extra level of customization in there that is superseding it.

    Another idea is to use the Simple Custom CSS plugin. That places custom styles in the document head, which will always take precedence in the cascade.

    Cheers!
    Geoff

    #1148291
    Brian
    Participant

    So this is actually on a dev site where we’re using X-Theme, not Avada, but I get your point. Pretty sure it’s TEC that’s overriding it, see the screenie, but I’ll just !important it for now, unless you can figure it out.

    #1148440
    Geoff
    Member

    Is there a live link for the dev site, by chance? I’d like to dig into the source a little deeper if it’s available.

    Thanks!
    Geoff

    #1148441
    Brian
    Participant

    This reply is private.

    #1148994
    Geoff
    Member

    Hey Brian, hope you had a great weekend!

    Thanks for the link — that’s super helpful. I was viewing the source and it appears that there is a good chunk of CSS inlined in the header. My guess is that the theme is trying to be super diligent in performance but that, in turn, could be fussing with the cascading styles in the stylesheets.

    Geoff

    #1157616
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Do I really need to !important all the things?’ is closed to new replies.