Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

How to prevent a flexbox from clipping the bottom element contained within it (automatically; without hardcoding a fixed amount of additional space)

$
0
0

Browser: Firefox v134.0.2

In the following example, the bottom part of the y letters in the word yesterday don't seem to be contained within the <rb> tag, as they should; these bottom parts intrude on the space of the element that immediately follows <rb> tag.

ruby {  ruby-position: under;}ruby ruby {  ruby-position: over;}ruby {  background-color: rgb(100, 100, 100);}ruby rt {  background-color: rgb(200, 227.5, 255);}ruby ruby {  background-color: rgb(255, 200, 200);}ruby ruby rt {  background-color: rgb(200, 255, 200);}
<ruby style="font-size:180px;display:inline-flex;flex-direction:column;text-align:center;/*justify-content:space-evenly;*/align-items:center;"><span><ruby>昨<rp>(</rp><rt>キ</rt><rp>)</rp></ruby><ruby>日<rp>(</rp><rt>ノウ</rt><rp>)</rp></ruby></span><rt>yesterday</rt></ruby><br><div style="width:50%;margin-left:15px;font-size:40px;background-color:rgb(0,255,0);">the bottoms of the "y" letters intrude into this element</div>

the output

Can we somehow solve this problem without hard-coding an additional space of a specific size (which we can determine by trial and error) below the y letters (e.g. <rt style="padding-bottom:5px;">yesterday</rt>), so that it's taken care of automatically (as it should've been)?


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>