Skip to content

fix(style): use container queries for responsive design#10763

Merged
glowcloud merged 2 commits intomasterfrom
fix/media-to-container-queries
Mar 13, 2026
Merged

fix(style): use container queries for responsive design#10763
glowcloud merged 2 commits intomasterfrom
fix/media-to-container-queries

Conversation

@glowcloud
Copy link
Copy Markdown
Contributor

@glowcloud glowcloud commented Mar 9, 2026

This PR changes the usage of media queries to container queries, setting the main container to be provided by the element with swagger-ui class. This change is made to allow these styles to apply when Swagger UI is rendered inside of smaller containers, e.g. in Swagger Editor, and should not affect Swagger UI itself.

Note: The mixins don't seem to be used and the topbar in general is supposed to be used for standalone preset, but I updated them as well just in case. If we don't want them to be changed, I will revert them.

Example of styling before:
description-before

responses-before

Example of styling after:
description-aftetr

responses-after

@glowcloud glowcloud self-assigned this Mar 9, 2026
@glowcloud glowcloud marked this pull request as ready for review March 9, 2026 14:41
@glowcloud glowcloud merged commit e35000e into master Mar 13, 2026
9 checks passed
@glowcloud glowcloud deleted the fix/media-to-container-queries branch March 13, 2026 12:47
swagger-bot pushed a commit that referenced this pull request Mar 17, 2026
## [5.32.1](v5.32.0...v5.32.1) (2026-03-17)

### Bug Fixes

* invalidate models components cache based on location ([#10764](#10764)) ([fb78dd2](fb78dd2))
* **style:** use container queries for responsive design ([#10763](#10763)) ([e35000e](e35000e))
@swagger-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.32.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

davidanrod pushed a commit to davidanrod/swagger-ui that referenced this pull request Apr 9, 2026
davidanrod pushed a commit to davidanrod/swagger-ui that referenced this pull request Apr 9, 2026
## [5.32.1](swagger-api/swagger-ui@v5.32.0...v5.32.1) (2026-03-17)

### Bug Fixes

* invalidate models components cache based on location ([swagger-api#10764](swagger-api#10764)) ([fb78dd2](swagger-api@fb78dd2))
* **style:** use container queries for responsive design ([swagger-api#10763](swagger-api#10763)) ([e35000e](swagger-api@e35000e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants