Home › Forums › Calendar Products › Events Calendar PRO › Do I really need to !important all the things?
- This topic has 7 replies, 4 voices, and was last updated 9 years, 8 months ago by
Brian.
-
AuthorPosts
-
August 5, 2016 at 9:57 am #1148277
Brian
ParticipantI’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?
August 5, 2016 at 10:05 am #1148284Geoff
MemberHey 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!
GeoffAugust 5, 2016 at 10:15 am #1148291Brian
ParticipantSo 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.
August 5, 2016 at 2:48 pm #1148440Geoff
MemberIs 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!
GeoffAugust 5, 2016 at 2:50 pm #1148441Brian
ParticipantThis reply is private.
August 8, 2016 at 8:43 am #1148994Geoff
MemberHey 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
August 30, 2016 at 9:35 am #1157616Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Do I really need to !important all the things?’ is closed to new replies.
