plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

TailwindCSS breaks Plotly modebar layout

Open wuyuanyi135 opened this issue 4 years ago • 6 comments

When using Plotly together with TailWindCSS I noticed that the mode bar's layout is not correct: image Here is the codepen for reproducing this error.

I could confirm this was caused by the following rule that override the display property of .main-svg.

img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
}

I could fix this by adding this to override the CSS normalization behavior.

svg {
    display: inherit;
}

I noticed that the display property was block anyway. I don't understand how this inconsistency is caused. Do you think this is a bug?

wuyuanyi135 avatar Jul 16 '21 07:07 wuyuanyi135