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

Code samples in light mode have poor color contrast #217

Closed
aerovulpe opened this issue Jun 23, 2022 · 7 comments · Fixed by #221
Closed

Code samples in light mode have poor color contrast #217

aerovulpe opened this issue Jun 23, 2022 · 7 comments · Fixed by #221
Assignees
Labels

Comments

@aerovulpe
Copy link
Contributor

Hi,

Thanks, @rohit-gohri for this awesome tool and being really helpful.

I have noticed an issue that I'm not sure is known.

The light mode theme makes it hard to read the text inside code samples.

image

Thanks again for all your help.

@aerovulpe
Copy link
Contributor Author

Looking at the CSS, this is caused by background-color: var(--ifm-background-color); when --ifm-background-color is a light color. Which makes sense for a light theme.

@kimsauce
Copy link
Contributor

kimsauce commented Jul 6, 2022

I am seeing this issue as well
2022-07-06_16-42-49

@rohit-gohri rohit-gohri added help wanted PRs are encouraged and will be accepted styles labels Jul 7, 2022
@rohit-gohri
Copy link
Owner

Can you provide a openapi yaml that has code samples (even better would be a PR to add it to examples) ? So I can reproduce it

@aerovulpe
Copy link
Contributor Author

aerovulpe commented Jul 10, 2022

Hey @rohit-gohri , the OpenAPI YAML specification used for the multi-file YAML example has code samples.

I've created a commit replicating this in the example app by setting the --ifm-background-color theme variable to a light color for the light theme.

Here's the commit: ChatKitty@196523b

The screenshot is /examples/using-multi-file-yaml/#tag/pet/operation/addPet of the website example project running on that commit.

image

@rohit-gohri
Copy link
Owner

the OpenAPI YAML specification used for the multi-file YAML example has code samples.

Thanks, forgot about this 🤦

Can you test the fix by installing redocusaurus@v0.0.0-test-20220711040249 ?

@rohit-gohri rohit-gohri self-assigned this Jul 11, 2022
@rohit-gohri rohit-gohri removed the help wanted PRs are encouraged and will be accepted label Jul 11, 2022
@aerovulpe
Copy link
Contributor Author

Thanks, @rohit-gohri!

I have installed redocusaurus@v0.0.0-test-20220711040249 and confirmed that it fixes this. 👍

@rohit-gohri
Copy link
Owner

a-ignatov-parc added a commit to a-ignatov-parc/redocusaurus that referenced this issue Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants