Answer the question
In order to leave comments, you need to log in
How to collapse an element if it doesn't fit?
<parent>
<title />
<button />
</parant>
Answer the question
In order to leave comments, you need to log in
Achieved approximately the desired effect by adding
button {
white-space: pre-line;
}
button:before {
content: '';
display: inline-block
}
In this case, if the text does not fit in the button, it moves to the next line, which is overflow: hidden
It seems to work, but not as we would like
It looks more like a crutch
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question