Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown Code block Has Contrast Issue in Dark Mode #231

Open
Snivio opened this issue Sep 12, 2022 · 5 comments
Open

Dropdown Code block Has Contrast Issue in Dark Mode #231

Snivio opened this issue Sep 12, 2022 · 5 comments
Labels
bug Something isn't working styles

Comments

@Snivio
Copy link
Contributor

Snivio commented Sep 12, 2022

image

In the Dark Mode Redeadin, the Text Inside the code block Becomes Difficult.

As there is no direct css selector available for the fix.

Temporary Fix: I have used the class name as I can see that it is static for that block .

[data-theme='dark'] .redocusaurus .api-content .sc-jQHtVU {
  background-color: transparent;
}

Is there any known workaround for this issue?

Thank you!

@rohit-gohri
Copy link
Owner

Your temporary fix is the solution if you can make the selector not use css-in-js class names. Feel free to open a PR adding the style override here - https://github.com/rohit-gohri/redocusaurus/blob/main/packages/docusaurus-theme-redoc/src/theme/Redoc/styles.css

@rohit-gohri rohit-gohri added bug Something isn't working styles labels Sep 12, 2022
@Snivio
Copy link
Contributor Author

Snivio commented Sep 12, 2022

I was trying to avoid the css-in-js classes but the div position seems to be dynamic and there isn't any other form of selector I can use, cant use the nth,not,has .. etc.

Snivio added a commit to Snivio/redocusaurus that referenced this issue Sep 12, 2022
Dropdown Code block Has Contrast Issue in Dark Mode rohit-gohri#231
@Snivio
Copy link
Contributor Author

Snivio commented Sep 12, 2022

The problem seems to appear from

This line here is causing the issue i have tried changing the color and running the redoc code seems to have fixed the issue.

The patch also fixed the below issue

image

@Snivio
Copy link
Contributor Author

Snivio commented Sep 13, 2022

PR:
#232

@Fiahblade
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working styles
Projects
None yet
Development

No branches or pull requests

3 participants