@media (prefers-color-scheme: dark) {
/* Set a default color on the body */
body {
background-color: #121212 !important;
color: #f5f0e1!important;
}
code
/* Target The Events Calendar wrappers explicitly */
.tribe-events,
.tribe-events * {
color: #f5f0e1!important;
background-color: transparent !important;
}
/* Override any buttons or interactive elements that might have internal color values */
.tribe-events .tribe-events-button,
.tribe-events .tribe-events-button:hover,
.tribe-events .tribe-events-button:active {
color: #f5f0e1 !important;
background-color: #333333 !important;
border-color: #f5f0e1 !important;
}
}
event overview is white text on black in dark mode, but events there is darker text on black background. light mode works for both. change code that also events work
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Based on your description, it sounds like your dark mode settings are applied correctly on the event overview page but that the individual events list (or “Events” view) isn’t getting the white text you expect. One common cause is that some more specific rules (or different container selectors) might be overriding your dark mode settings for that view.
A common solution is to target the events list container (and its children) explicitly. For example, if the events list is contained in an element with a class such as .tribe-events-list (a common container class when using The Events Calendar), you can add an extra rule so that all text inside that container is forced to use your dark mode text color. You might try something like this:
css
@media (prefers-color-scheme: dark) {
/* Set a default color on the body */
body {
background-color: #121212 !important;
color: #f5f0e1 !important;
}
/* Target The Events Calendar wrappers explicitly */
.tribe-events,
.tribe-events * {
color: #f5f0e1 !important;
background-color: transparent !important;
}
/* Explicitly target the events list view (if applicable) */
.tribe-events .tribe-events-list,
.tribe-events .tribe-events-list * {
color: #f5f0e1 !important;
}
/* Override any buttons or interactive elements that might have internal color values */
.tribe-events .tribe-events-button,
.tribe-events .tribe-events-button:hover,
.tribe-events .tribe-events-button:active {
color: #f5f0e1 !important;
background-color: #333333 !important;
border-color: #f5f0e1 !important;
}
}
What This Does
Global Dark Mode:
The dark mode media query sets the background of the <body> to a dark color and the default text color to #f5f0e1.
The Events Calendar General Override:
The rule for .tribe-events, .tribe-events * forces any element in the events container to inherit the chosen light text color and a transparent background.
Specific Override for the Events List:
In some cases, the events listing view might be using a container with a different class (like .tribe-events-list) that has its own text color settings. The extra block ensures that all elements within .tribe-events-list also display the light text on a dark background.
Buttons Styling:
Interactive elements (like buttons) are styled with a dark background, light text, and a matching border.
Final Note
Depending on your exact HTML structure or if there are other theme/plugin styles in play, you might have additional selectors that need overriding. Be sure to inspect the events elements in your browser’s developer tools to check which CSS rules are being applied and adjust your selectors accordingly.
This updated CSS should help ensure that both your overview and your events list use the white text color in dark mode.