• Resolved gkbenji

    (@gkbenji)


    First just an FYI that the transition to the new version of GCE wasn’t seamless… the calendar widget disappeared for a bit, and didn’t return until I went to the widget, retyped the feed # (there’s only one feed) and re-saved. Then the calendar reappeared, but with all the custom styling missing.

    Okay, I knew that, copied everything from the custom CSS file and pasted it into my child theme’s main CSS file. But not all the styles were correct.

    According to Firebug, the CSS in the plugin directory is taking precedence over CSS in the main theme CSS?! For example, for days with no events, the theme CSS specifies color #666. But the color being used is the plugin default #cccccc.

    You can see the calendar widget on the right side of the site: http://www.rivendell-school.org.

    I’m probably missing something stupid, but what is it? Thanks.

    https://wordpress.org/plugins/google-calendar-events/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Bernd

    (@bernd-albers)

    Have you tried this in the theme css?

    #666 !important;

    Worked in my theme.

    Thread Starter gkbenji

    (@gkbenji)

    Thanks Bernd, but that is just one example of the many styles I have that aren’t working. I don’t want to have to go put !important in front of every one.

    A workaround I can use for now might be to rename the CSS file in the plugin directory (although I’m leaving it for now so the CGE developers can take a look). But the styles in my theme should take precedence over those in the plugin directory, right? CGE no longer supports the custom CSS file that gets parsed last.

    Hmmm… following up on that, I checked the page source header, and it does look like plugin style sheets get loaded AFTER the theme CSS. Bleh. That may be why many plugins that have their own CSS but may need lots of styling allow a custom CSS file to be specified.

    So, perhaps change this to a request to bring back the custom CSS file.

    I the meantime, I will look for another workaround (I already have a plugin that will allow you to add a custom class to a widget, that may be the best option).

    Plugin Contributor Nick Young

    (@nickyoung87)

    @gkbenji

    What is the CSS selector that is actually being used by the plugin that you are trying to modify and then what is the CSS selector you are using to try and change it?

    I want to make sure it isn’t a CSS specificity issue, which is what it sounds like it might be.

    Plugin Contributor Nick Young

    (@nickyoung87)

    Going to assume this has been resolved since there has been no response. If you have any more issues please let us know. Thanks!

    I”m having this exact issue. Do I really need to put !important at every custom style?

    So, to be more clear, I have completely customized every instance I have of this calendar. It had resided in it’s own css file in the old plugin. Now, although I’ve put it in my main css file, it is overridden by the plugin’s stylesheet because it loads after it.

    Is there any chance of reinstating the old plugin’s customized css path?

    Plugin Contributor Nick Young

    (@nickyoung87)

    You would not necessarily need to use !important, you could also make it more specific by using an element ID of a wrapper if there is one.

    Example:

    #content .gce-list {}
    .gce-list {}

    The first one is more specific so it would get used over the general one the plugin CSS is using.

    As far as your other question about reinstating the CSS path, I am not sure. But you can head over to the road map and let us know it is important to you so we can keep track of these kinds of things.

    https://trello.com/b/ZQSzsarY

    Thanks

    Thanks Nick,

    The more specific CSS works, but it also adds bulk to the file (load the gce styles then override them with specific styles).

    I would rather have an option to NOT load the gce styles in settings (turned off by default for the majority of users and only used if the developer has included gee styles in the theme)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘CSS in plugin directory overrides theme CSS?’ is closed to new replies.