I have a problem with that scaling of :after
when text in button is longer than one line. It's the business of display: inline-flex
. Does anyone know how to solve this problem? Small width of div box
is necessary. Please help.
.box {
width: 300px
}
.button {
font-weight: 600;
color: #000;
text-transform: uppercase;
display: inline-flex;
padding: 5px 20px;
align-items: center;
justify-content: center;
border: 1px solid #004FA3;
min-width: 135px;
background: transparent;
cursor: pointer;
font-size: 16px;
}
.button::after {
content: "";
display: block;
width: 21px;
height: 21px;
min-height: 21px;
background-image: url(https://svgshare.com/i/HJM.svg);
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: right;
margin-left: 13px;
}
<div class="box">
<a class="button">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
</a>
<hr>
<a class="button">
Lorem ipsum
</a>
</div>