A platform for community discussion. Free, open, simple.
UX: Fit large Graphviz graphs to the box instead of overflowing (#40915)
David Taylor5ba00d57b0ab
diff --git a/plugins/discourse-graphviz/assets/stylesheets/common/graphviz.scss b/plugins/discourse-graphviz/assets/stylesheets/common/graphviz.scssindex 1334a9e0bcd..47d40dd418e 100644--- a/plugins/discourse-graphviz/assets/stylesheets/common/graphviz.scss+++ b/plugins/discourse-graphviz/assets/stylesheets/common/graphviz.scss@@ -54,6 +54,13 @@ div.graphviz.is-loading {> * {flex: 0 0 auto;}++ > svg {+ width: auto;+ height: auto;+ max-width: 100%;+ max-height: 100%;+ }}.graph-error {@@ -84,8 +91,9 @@ div.graphviz.is-loading {> svg {max-width: none;+ max-height: none;width: auto;- height: 100%;+ height: auto;}}}