enhance.dev icon indicating copy to clipboard operation
enhance.dev copied to clipboard

Fix overflowing issues in callouts

Open femincan opened this issue 4 months ago • 3 comments

The callouts overflows the screen on mobile screens. The main cause of this issue is the long code blocks in callouts. I fix the issue by giving a min-width: 0 property to the content div of the callout. Because that div is a flex item and min-width: auto by default, the min width of the div is the min-content without breaking any text. When we give min-width: 0, the element correctly shrinks and a scroll-bar appears for the code content. Also now the inline code can correctly wraps to the next line.

Before: (The callout content overflows) image After: (The overflowling issue is solved with min-width property) image

femincan avatar Oct 19 '25 06:10 femincan

recheck

femincan avatar Oct 19 '25 18:10 femincan

Can you also review this pull request @filmaj?

femincan avatar Oct 19 '25 18:10 femincan

I'm not a CSS expert so I don't feel confident reviewing this one, sorry.

filmaj avatar Oct 19 '25 22:10 filmaj