Skip to content

A compact swagger stylesheet for use with .net swashbuckle and other swagger UI implementations. Less unused white space and scrolling.

Notifications You must be signed in to change notification settings

karlpothast/swagger-compact-css

Repository files navigation

swagger-compact-css

A compact swagger stylesheet for use with .net swashbuckle and other swagger UI implementations. Less unused white space and scrolling.

  1. Add the custom.css stylesheet to your wwwroot/swagger-ui/ directory just like it is in this repo.
  2. Edit your program.cs file and add InjectStylesheet to your SwaggerUI options and specify the same file as in step 1 .InjectStylesheet("/swagger-ui/custom.css");.
  3. Then add UseStaticFiles() to your app configuration.

image

Default UI (before custom CSS)

Info section takes up 1/3 of the page, need to move the mouse across the screen and back to "Try This Out" and "Execute" then scroll down futher to see the response. alt-text-1

Compact UI (after custom CSS)

All buttons on the left with the info section in a side bar, no wasted white space and this particular response is visible without scrolling down. alt-text-2

with .NET theme

image

About

A compact swagger stylesheet for use with .net swashbuckle and other swagger UI implementations. Less unused white space and scrolling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages