-
Dan Hotchkiss
Hi,
I’m seeing a low-contrast background/text combination when editing events using The Events Calendar with the WordPress block editor. When I open an event, the main content area is washed in a medium blue and the event text appears as light gray on that blue, making it hard to read and edit.
When I switch from GeneratePress to Twenty Twenty-Two, the problem goes away and I see black on white in the editor.
Details:
WordPress version: (e.g., 6.x)
Editor: Block editor (Gutenberg) enabled for events under Events → Settings → General
The issue appears only in the event editing screen, not on the front‑end calendar views.I’ve confirmed that:
Closing the right sidebar or toggling editor toolbar options does not remove the blue wash.
It only affects the editor canvas for TEC events, not regular posts/pages.
This appears to be a background/text contrast problem inside the editor UI, not the published event.
From an accessibility standpoint, the gray text on the blue background is difficult to use for extended editing sessions.Thanks very much for your help.
Dan
-
Hi Dan,
Can you provide an admin login so we can check the issue in the editor?
-
Dan Hotchkiss
Sure
-
Can you share your site’s login link and username?
-
Dan Hotchkiss
Done
-
Alvind
Hi Dan,
Could you provide the full login URL? It seems we did not receive the reset email.
-
Dan Hotchkiss
Tried again.
-
Alvind
In WP 7.0, CSS added in the Customizer is automatically enqueued in the Block Editor.
That means any CSS intended only for the frontend may also be applied inside the editor. In this case, the background color issue you’re seeing in the editor is likely caused by Customizer CSS being applied there.
One workaround is to prevent that CSS from being enqueued in the editor by adding this PHP snippet:
add_filter( 'block_editor_settings_all', function ( $settings ) { if ( empty( $settings['styles'] ) || ! is_array( $settings['styles'] ) ) { return $settings; } $settings['styles'] = array_values( array_filter( $settings['styles'], static function ( $style ) { if ( ! is_array( $style ) ) { return true; } return ! ( isset( $style['__unstableType'], $style['isGlobalStyles'] ) && 'user' === $style['__unstableType'] && false === $style['isGlobalStyles'] ); } ) ); return $settings; }, 20 );That should resolve the issue.
-
Dan Hotchkiss
Interesting. Can you point me to information about why WP made this change? If there are benefits, might it be better to track down the Customizer code that is affecting the editor and make it more specific?
Thanks,
Dam -
Alvind
It’s related to the new Additional Custom CSS feature added to individual core blocks in WP 7.0:
It looks like it may be absorbing the Customizer CSS, which does make sense.
And yes, tracking down which CSS in the Customizer is affecting the editor, then scoping it so it only applies on the frontend, is probably the better approach.
-
Dan Hotchkiss
I will see if I can find the offending CSS. I do wonder why the problem goes away when I switch away from the GeneratePress theme.
Dan
-
Because when you switch to other themes, the additional CSS field is empty.
-
Dan Hotchkiss
The background color I was finding in the editor screen was not coming from my Additional CSS, but from the body color I had set in Customizer–rgba(51,102,204,0.62). I guess the idea is that the editor should start with the site background color, which makse sense.
I worked around it with this CSS:
/* Fix TEC editor background */
.post-type-tribe_events
.editor-styles-wrapper {
background-color: #ffffff
!important;
}The edit screen background and text now contrast well enough that it fixes the immediate problem, and this approach seems likly to contain any side-effects.
Oddly, the background and text colors I see in the TEC editing screen don’t match what I find when I inspect them. TEC edit screens seem to have some kind of scrim that darkens the background and lightens the text, but I can’t find anything that accounts for this in DevTools. I’ll follow up with The Events Calendar about this.
Thanks,
Dan -
George
Hi Dan,
The piece that explains the mismatch you’re seeing in DevTools is the alpha channel on that color:
rgba(51,102,204,0.62). The0.62makes it semi-transparent, so whatever sits behind it shows through and blends. That’s why the rendered color never matches the literal value you inspect — DevTools shows you thergba()value, but what you see on screen is that blue composited over whatever is behind it. There’s no hidden “scrim”; it’s the transparency doing the blending.In WP 7.0 the editor canvas now inherits the Customizer body background, so that semi-transparent blue is being applied inside the editor. Your white fix for events works because the body there carries the
tribe_eventsclass, but it only covers events — regular posts and pages still get the blue, which is what you’re seeing on the non-event screen.Two ways to clear it up:
- The simplest is to set the body background to a solid color in the Customizer — drop the alpha. If you want that same blue, use
#3366cc. A semi-transparent body background is what’s bleeding into the editor, so removing the transparency fixes it everywhere at once. - If you need the transparency on the frontend, broaden your editor override so it isn’t limited to events:
.editor-styles-wrapper { background-color: #ffffff !important; }That gives every post type a clean white editing canvas while leaving your frontend untouched. If you go this route, you can delete your existing
.post-type-tribe_events .editor-styles-wrapperrule — this one covers events and everything else.One small aside on that old rule: there’s a space between
.post-type-tribe_eventsand.editor-styles-wrapper, which makes it a descendant selector (an.editor-styles-wrapperinside a.post-type-tribe_eventselement) rather than one element with both classes. It happens to match on the event screen because the editor body carries both classes, but it’s worth knowing in case you reuse the pattern elsewhere.This is expected WP 7.0 behavior combined with the semi-transparent color, so no bug on our end.
- The simplest is to set the body background to a solid color in the Customizer — drop the alpha. If you want that same blue, use
-
Dan Hotchkiss
Thanks George,
You’re right about transparency in the site background being one source of the readability problem. The other is that the text on TEC’s editor screen also looks grey (#A5A6AB), which works a little better against white than against blue. (The transparent blue actually had better contrast.) Making the background white in CSS results in a displayed background of #EEEEEE. A workaround, not a solution. Everything looks greyed out!
Regular posts show my full-blue background with real black (#000000) letters unless I change them, which works fine.
I agree this is not a GB problem, so I’ll keep after it with TEC and see if they can help. Though I’m always open to suggestions!
Dan
-
George
Ok, Dan, let us know how it goes!
- You must be logged in to reply to this topic.