Skip to content

fix(extension): resolve Codeforces dark mode visibility for code syntax and LGM handles (closes #31) - #32

Open
Thundercloud12 wants to merge 1 commit into
Soham109:mainfrom
Thundercloud12:fix/darkmode-contrast-issues
Open

fix(extension): resolve Codeforces dark mode visibility for code syntax and LGM handles (closes #31)#32
Thundercloud12 wants to merge 1 commit into
Soham109:mainfrom
Thundercloud12:fix/darkmode-contrast-issues

Conversation

@Thundercloud12

Copy link
Copy Markdown
Contributor

Summary

This PR fixes text contrast and visibility issues when using the Browser Companion's dark theme on Codeforces pages. Specifically, it resolves the invisible code syntax elements on submission status pages and makes the first letter of Legendary Grandmaster (LGM) usernames legible.

Closes #31

Component

  • Browser companion (Chrome and Firefox)
  • Terminal app (Rust)
  • VS Code extension
  • Website / docs

What changed

  • Code Syntax Highlighting Fix (cfColorCode):
    • Overrode Google Code Prettify's .pln (plain text/variables) and .pun (braces, operators, punctuation) classes within .prettyprint to use the themed foreground color (p.fg) under dark mode, preventing them from rendering as black text.
    • Overrode comments (.com) to use the themed dim color (p.dim).
  • LGM Username First Letter Visibility Fix (cfColorMisc):
    • Overrode .legendary-user-first-letter to use the themed foreground color (p.fg) under dark mode so that the black first letter of LGM handles remains visible against dark page backgrounds.

Test plan

  1. Install/load the unpacked extension in Chrome/Firefox.
  2. Enable dark mode in CPOS.
  3. Open a Codeforces submission status page containing source code (e.g. click a submission ID #). All variables, semicolons, brackets, and operators should now be fully legible and high-contrast.
  4. Locate any Legendary Grandmaster user (e.g. tourist). The first letter of their handle should be readable instead of blending into the background.

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@Thundercloud12 is attempting to deploy a commit to the Soham Aggarwal's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Thundercloud12

Copy link
Copy Markdown
Contributor Author

@Soham109 just fixing a issue raised nothing much fix is just overriding the style

@Soham109

Copy link
Copy Markdown
Owner

hey @Thundercloud12, thanks for your pr. I have been a little busy lately. Please allow me till the 2nd week of september. Sorry for the delay and thank you so much for your contribution!

@Thundercloud12

Copy link
Copy Markdown
Contributor Author

@Soham109 no worries!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Colour mismatches on codeforces

2 participants