Skip to content

Commit 6348f9c

Browse files
authored
[docs] HTML Legend sample: add flex-shrink: 0 to color box (#11330)
This way the color box is prevented from shrinking in case of larger legends.
1 parent 0cbc292 commit 6348f9c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/samples/legend/html.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const htmlLegendPlugin = {
6161
boxSpan.style.borderColor = item.strokeStyle;
6262
boxSpan.style.borderWidth = item.lineWidth + 'px';
6363
boxSpan.style.display = 'inline-block';
64+
boxSpan.style.flexShrink = 0;
6465
boxSpan.style.height = '20px';
6566
boxSpan.style.marginRight = '10px';
6667
boxSpan.style.width = '20px';

0 commit comments

Comments
 (0)