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

OAS 3.1 Dark Mode Contrast #22

Closed
busches opened this issue Feb 21, 2024 · 2 comments
Closed

OAS 3.1 Dark Mode Contrast #22

busches opened this issue Feb 21, 2024 · 2 comments

Comments

@busches
Copy link
Contributor

busches commented Feb 21, 2024

The color contrast in some spots when reading OAS 3.1 is very low and hard to read.

Using the sample OAS 3.1 sample as an example: https://blueswen.github.io/mkdocs-swagger-ui-tag/demo/openapi-v3.1/
image
All of this text is very difficult for me to read, but I focused on the property name and put it into a whocanuse.com comparison:
https://www.whocanuse.com/?bg=1e2129&fg=3b4150&fs=16&fw=

It gives it a 1.58:1 contrast ratio, compared to the light theme of 6.89:1, https://www.whocanuse.com/?bg=d4e1db&fg=414757&fs=16&fw=

Compare to this to OAS 3.0, which has great contrast of the property names: https://blueswen.github.io/mkdocs-swagger-ui-tag/demo/static-file/
image
13.93:1 - https://www.whocanuse.com/?bg=1c1f27&fg=e9ebfc&fs=16&fw=

Any chance we increase the contrast used in dark mode for OAS 3.1?

@blueswen
Copy link
Owner

Thanks for advising. I will add some style for OAS 3.1 schema elements(json-schema-2020-12) in the latest version. The new effect on OAS 3.1 looks as follows:

CSS Demo

JSON Key https://www.whocanuse.com/?bg=1e2129&fg=e9ebfc&fs=16&fw=
Data Type https://www.whocanuse.com/?bg=1e2129&fg=c2c2e0&fs=16&fw=

And https://www.whocanuse.com/ is a pretty cool tool. Thanks for sharing!

@busches
Copy link
Contributor Author

busches commented Feb 29, 2024

Awesome, looks much improved, can we also style the open/close arrow? It's still black on almost black in your screenshot.

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

No branches or pull requests

2 participants