tmedwards / sugarcube-2

SugarCube is a free (gratis and libre) story format for Twine/Twee.
https://www.motoslave.net/sugarcube/2/
BSD 2-Clause "Simplified" License
177 stars 41 forks source link

Overflow issue on Dialog Box #247

Closed manonamora closed 1 year ago

manonamora commented 1 year ago

Describe the bug. Changing the max-height of the Dialog Box breaks the overflow when the text rendered is longer than the screen.

To Reproduce: Steps to reproduce the behavior: 1 - Create a dialog box with a lot of text (I added 10 paragraph of Lorem Ipsum for the example) 2 - add max-height: 75vh; to #ui-dialog 3 - Open the Dialog box

Expected behavior. The dialog box would have a max-height, and the overflow would still work/wrap the body. image

Screenshots. image image

Project details.

Desktop details.

Additional context. It does work if height of #ui-dialog is set to a value instead of max-height, or if max-height is added to the #ui-dialog-body. If the issue is just me not doing CSS right, please mark as closed and disregard (also sorry in advance if that is the case).

tmedwards commented 1 year ago

Very little, aside from theming, should be done to #ui-dialog. Try applying your dimensional styles to #ui-dialog-body.

To add a bit of context. The #ui-dialog-body element is the content container, it's what grows and shrinks with your content. The #ui-dialog element is just along for the ride.

manonamora commented 1 year ago

Good to know~ Thank you!!!