My React code:
<InfoWrapper>
<InfoCircle>
<span>i</span>
</InfoCircle>
<span className="info-label">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
elit.
</span>
</InfoWrapper>
This renders correctly like this:
The information circle has a size of 28x28.
But if I add more text so that the span expands to multiple lines, the size of the info circle turns into 16.5x28:
I don't have any shrinking rule set and on InfoWrapper
, since I set align-items
to flex-start
so that items won't stretch vertically.
Here's a snippet with the code in full:
span {
font-size: 0.875rem;
}
.info-wrapper {
align-items: center;
display: flex;
flex-flow: row nowrap;
margin-top: 1.25rem;
}
.info-circle {
align-items: center;
background-color: #f5f7ff;
border-radius: 0.875rem;
display: flex;
flex-flow: row nowrap;
height: 1.75rem;
justify-content: center;
width: 1.75rem;
}
.info-label {
font-size: 0.9375rem;
margin-left: 0.5rem;
}
<div class="info-wrapper">
<div class="info-circle">
<span>i</span>
</div>
<span class="info-label">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</span>
</div>