A custom CSS file that provides a dark theme and larger text for Swagger UI documentation pages in FastAPI applications.
- ✨ Dark mode for Swagger UI
- 📱 Enlarged text size for better readability
- 🎨 Modify the CSS to suit your preferences.
- 🚀 Easy integration
- ⚡ Fully compatible with FastAPI applications
-
Download a CSS injector extension. For example, you can use the Stylus extension from this link.
-
Open your FastAPI docs page (Swagger UI).
-
Click on the Stylus extension and select "Create new style".
-
Copy and paste all CSS code from the CSS file (this link) into the editor.
-
Add the following URLs to the "Applies to" section in Stylus to ensure the CSS is applied to your local FastAPI Swagger UI:
http://localhost
http://127.0.0.1
or your custom domain (https://mydomain.com)
-
Click save.
-
Tada! 🎉🥳 That's all there is to it.
You can customize the CSS file according to your needs:
- Update the relevant CSS variables to change the color palette
- Adjust font-size values to modify text sizes
- Fork this repository
- Add new features or fix bugs
- Submit a pull request
MIT