-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
See the attached screenshots from https://overtype.dev/demo
In Preview Mode, code block colors always appear as if a dark theme is active, even when the light theme is selected. This makes code blocks look incorrect and inconsistent with the rest of the preview.
I traced the issue to the following styles, which hardcode dark-theme colors for preview mode:
https://github.com/panphora/overtype/blob/main/src/styles.js#L764-L773
/* Code blocks - proper pre/code styling in preview mode */
.overtype-container[data-mode="preview"] .overtype-wrapper .overtype-preview pre.code-block {
background: #2d2d2d !important;
color: #f8f8f2 !important;
padding: 1.2em !important;
border-radius: 3px !important;
overflow-x: auto !important;
margin: 0 !important;
display: block !important;
}
Because these values are hardcoded, code blocks in Preview Mode do not adapt to the active light/dark theme.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels