Intent
The diagram block from #133 scales its SVG to fill the document column, so a tall diagram gets scaled up and a short one gets scaled down. Two diagrams in the same document then show text at very different sizes: a three node flow reads at about 18px and an eight node flow at about 28px. A document with several diagrams looks unplanned.
Given / When / Then
-
Given two diagrams of different size in the same document
-
Then the node text in both renders at the same size on screen
-
Given a diagram wider than the document column
-
Then it scales down to fit, and the whole diagram stays visible
-
Given a diagram narrower than the document column
-
Then it does not stretch to fill the width; it stays at its natural size and sits centred
-
Given a very large diagram scaled down to fit
-
Then the text is still readable, or the block says the diagram is too large to show at a readable size
-
Given the light and dark themes
-
Then nothing about the scale changes
Notes
Intent
The diagram block from #133 scales its SVG to fill the document column, so a tall diagram gets scaled up and a short one gets scaled down. Two diagrams in the same document then show text at very different sizes: a three node flow reads at about 18px and an eight node flow at about 28px. A document with several diagrams looks unplanned.
Given / When / Then
Given two diagrams of different size in the same document
Then the node text in both renders at the same size on screen
Given a diagram wider than the document column
Then it scales down to fit, and the whole diagram stays visible
Given a diagram narrower than the document column
Then it does not stretch to fill the width; it stays at its natural size and sits centred
Given a very large diagram scaled down to fit
Then the text is still readable, or the block says the diagram is too large to show at a readable size
Given the light and dark themes
Then nothing about the scale changes
Notes