arjun-g / vs-swagger-viewer

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.
MIT License
169 stars 47 forks source link

Add dark mode option #115

Closed weldeondotwav closed 1 year ago

weldeondotwav commented 1 year ago

I found a CSS sheet with MIT license for a dark theme for the Swagger-UI page (link here). This is an example of how it could be integrated into the extension. I'm not super familiar with the best practices for vscode extension development, so maybe some of what I did could be improved. With this setup, after the user changes their extension setting to enable dark mode, the preview server needs to be restarted.

I spliced in the original CSS rules into this dark mode stylesheet to keep some of the original choices (such as omission of the top bar).