Forum Replies Created
-
AuthorPosts
-
Andy Fragen
ModeratorYou’re welcome Karen. It’s in my nature to apply the KISS principle to most things.
Andy Fragen
Moderatorkaren/Cynthia, why do you want to move a default css file to {YOUR_THEME}/tribe-events/ folder. What you should do is just create a new tribe-events.css file in this new folder and simply add your CSS overrides to it. You don’t need to override the entire file and I would guess that this is probably not a good idea in general as any changes that Modern Tribe makes to these defaults would then not be used. It also defeats the whole concept of cascading in CSS.
In almost every case, I would think best case usage would be to only make your specific changes to an override file. There’s no point in duplication. The benefit is that you really don’t need to know where the default css files are located. All you need is to figure out the selector that you wish to change.
Creating a {YOUR_THEME}/tribe-events/tribe-events.css file shouldn’t be sufficiently different than putting any overrides in your theme’s style.css, it just serves to abstract the overrides in case you change themes later.
If there’s something specific you want to change perhaps we can help further.
Andy Fragen
Moderator@Genesis – you don’t happen to have WP_DEBUG set to true?
Andy Fragen
ModeratorBut to what end? It won’t be significantly faster and using wp_enqueue_style is the correct way of loading CSS.
If your adding all the CSS to your theme style.css you can run into an issue if the plugin CSS ever changes.
Andy Fragen
ModeratorWell, Modern Tribe loads what they consider “necessary” CSS files based upon the user’s settings. I guess I’m not really sure what you’re trying to accomplish by dequeuing the plugin’s CSS and enqueuing it in your theme.
Andy Fragen
ModeratorDidn’t this answer the dequeue question?
No apologies needed.
Andy Fragen
ModeratorJonah, Just for fun you could try The Events Calendar Category Colors and in particular see how Legend Superpowers works.
Andy Fragen
ModeratorActually, it seems to automatically load after the TEC CSS but before the TEC Pro CSS
Andy Fragen
ModeratorYes, but while the tribe-events.css is loaded automatically, you will notice it is loaded ahead of the standard plugin CSS and not after it. Because of this the overrides won’t be seen. Simple to test, just deactivate the plugin.
Andy Fragen
ModeratorBryan, I’m not so sure dequeuing them all and enqueuing them in your theme is a good idea, but if you want to, the dequeue ID doesn’t include the final ‘-css’. That bit is added by WordPress.
The proper code would be wp_dequeue_style( ‘full-calendar-style’ );
Andy Fragen
ModeratorBryan/Cynthia,
If you want to include CSS overrides I would suggest the following solution. Put all overrides in /tribe-events/tribe-events.css. Install and activate The Events Calendar User CSS plugin. Currently TEC 3.0 will automatically load the CSS from the new location, the problem is, by default, it loads the CSS before, not after, the default CSS. This is going to be corrected in a future update. Until that time, the User CSS plugin fixes this problem.
Andy Fragen
Moderatorswissvegan, I believe there’s an issue with the load order of the tribe-events.css
You can fix this by installing The Events Calendar User CSS plugin. Let me know if that solves your issue.
Andy Fragen
Moderatordahowlett – Oops, I just discovered that while TEC 3.0 does automatically load your override CSS if your have it located in the {YOUR_THEME}/tribe-events/tribe-events.css it loads it before the default CSS and not after. Therefore, none of your overrides will work.
I’ve adapted The Events Calendar User CSS to fix this and load the override CSS in at the end. Please update to version 0.9 and let us know if it works.
Andy Fragen
Moderatorswissvegan, if you could provide some additional info, URL, what default style item is and what your override is, that would help.
Andy Fragen
ModeratorBarry, is correct. The Events Calendar User CSS is no longer required for TEC 3.0 as long as you’ve changed the override CSS to be in {YOUR_THEME/tribe-events/tribe-events.css
-
AuthorPosts
