Skip to content

Improved contrast for copy-toast in dark mode#170

Open
yixun-chen wants to merge 1 commit intoKhronosGroup:mainfrom
yixun-chen:patch-1
Open

Improved contrast for copy-toast in dark mode#170
yixun-chen wants to merge 1 commit intoKhronosGroup:mainfrom
yixun-chen:patch-1

Conversation

@yixun-chen
Copy link
Copy Markdown
Contributor

In dark mode, the .copy-toast background (using --doc-font-color) becomes light-colored, while the text color was hardcoded to white. This resulted in invisible text.

This PR changes the text color to var(--body-background) to ensure high contrast and visibility in both light and dark themes.

In dark mode, the .copy-toast background (using --doc-font-color) becomes light-colored, while the text color was hardcoded to white. This resulted in invisible text.

This PR changes the text color to var(--body-background) to ensure high contrast and visibility in both light and dark themes.
@yixun-chen
Copy link
Copy Markdown
Contributor Author

Here are the screenshots for verification(I tested it in my browser):

Before:
image
In dark mode:
image
In light mode:
image

After:
image
In dark mode:
image
In light mode:
image

As shown, the "Copied!" text was invisible in dark mode due to the hardcoded white color. Using var(--body-background) correctly provides contrast in both themes.

@yixun-chen yixun-chen closed this Mar 13, 2026
@yixun-chen yixun-chen reopened this Mar 13, 2026
github-actions Bot pushed a commit that referenced this pull request Mar 13, 2026
@yixun-chen
Copy link
Copy Markdown
Contributor Author

Hi, sorry to bother you.
I noticed the CI failed at the "Comment on PR" step with a GraphQL error (PR #170). I'm not sure how to fix this on my end, so I tried to reopen the PR to re-trigger it, but the error persists.
Could someone please help me check if I missed anything? Thank you!

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.

1 participant