-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Dark theme #1
Comments
Yes, I have tried with the slate theme of Material for MkDocs, then I found it was unreadable. So I add a body background color(default: white) to prevent Swagger UI's transparent background as a workaround. I also have tried some dark mode css for Swagger UI, but they does not look good for me. Maybe swagger-api/swagger-ui#5964 could solve this. I will try this PR's css latter. |
I see, thanks! Feel free to close 🙂 |
@pawamoy Swagger UI Tag supports synchronized dark mode with mkdocs-material in v0.2.1 🎉. I used the Swagger UI dark mode css from Amoenus Swagger Dark Theme and modified some value to fit slate theme of Material. Since Material changes body's attribute data-md-color-scheme to switch light mode and dark mode. I observe data-md-color-scheme value to trigger enable or disable dark mode css in iframe. |
Woohoo, great job! Looks nice 🙂 Closing 😄 ! |
Hi! Did you try with the slate theme of Material for MkDocs enabled?
I actually integrated the Swagger UI in some projects docs (with a few lines of Javascript), and it looks nice with a light theme, but is unreadable with a dark theme. Maybe you found a way to improve that.
The text was updated successfully, but these errors were encountered: