Fix: Fix Code Block Styles in Editor (Light Mode)#95
Open
DaanVersteeg wants to merge 1 commit into0010aor:mainfrom
Open
Fix: Fix Code Block Styles in Editor (Light Mode)#95DaanVersteeg wants to merge 1 commit into0010aor:mainfrom
DaanVersteeg wants to merge 1 commit into0010aor:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #40 Code Blocks in the card editor displayed incorrect text colors.
Changes
frontend/src/theme.tsxcodebackground token for light mode from#f0f0f3to#e4e4e7(same color as menu bar) for a slightly stronger contrast against the page background.fg.codecolor token:_light: '{colors.gray.700}'— dark enough to be legible on a light background_dark: '{colors.gray.300}'— unchanged soft tone for dark modefrontend/src/components/commonUI/RichText/RichText.styles.csscolor: #d4d4d4onpreblocks (a light gray that was invisible in light mode) withcolor: var(--chakra-colors-fg-code), which now correctly resolves per theme.color: var(--chakra-colors-fg-code)to inlinecodeelements, which previously had no explicit foreground color at all.Root cause
The
preblock had a hardcoded color (#d4d4d4) that only worked in dark mode. In light mode this rendered near-white text on a light background, making code essentially invisible. Inlinecodeblocks had no foreground color set at all, so they also fell through to an unreadable default.