plotly.js
plotly.js copied to clipboard
TailwindCSS breaks Plotly modebar layout
When using Plotly together with TailWindCSS I noticed that the mode bar's layout is not correct:
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?