swagger-ui
swagger-ui copied to clipboard
[Feature Request] Dark mode
Would be nice to have a dark mode version of the UI.
I was going to open a issue right now on this subject hahaha
Poor man's dark mode:
.swagger-ui {
filter: invert(88%) hue-rotate(180deg);
}
.swagger-ui .highlight-code {
filter: invert(100%) hue-rotate(180deg);
}
Yes, but this is a feature request.
For those who looking for dark mode in swagger, you can use custom CSS with a stylus plugin. https://33kk.github.io/uso-archive/?search=swagger
There's also Dark Reader, but this shouldn't prevent Swagger from having a native dark theme ^^
Yea in my case I could build out an alternative, but swagger-ui-react sets sooooooo many default colors, I'm sure it will be brittle.
Agreed, it must be built-in.
But to get this going, maybe someone has dark mode styles to contribute? I see other apps simply use one of the popular themes floating around: "dracula", "nord dark", etc.
I assume if we make it easy for the devs to adopt, then we'll get this feature.
Now that have the dark mode, can I disable it?
There was an attempt to solve it https://github.com/swagger-api/swagger-ui/pull/5964 but for unknown reason PR was closed.
Any news on this ?
PR still closed, no other word about it. Dark mode must've killed one of the maintainers' hamster or something.
Still a problem too.
And most probably will continue being one: https://github.com/swagger-api/swagger-ui/pull/5964#issuecomment-1074046454
at this point I might as well just make my own openapi compliant spec ui with dark mode supported by default I don't understand how a developer can make a light mode UI it's literally torture