mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-28 16:47:01 +09:00
Mermaid scales diagrams wider than the markup column down to its width, but the iframe kept the unscaled viewBox height, leaving a large blank area below them. The iframe now uses a CSS `aspect-ratio` capped at the viewBox height, so it follows the rendered diagram on any width and resize without measuring, which keeps diagrams in collapsed `<details>` working. Diagrams that don't scale (`useMaxWidth: false`) keep the fixed height. Fixes: https://github.com/go-gitea/gitea/issues/40045