Using implicit width, which involves adding padding to an element containing text to give the parent container a specific but unstated width, can be quite elegant. However, it poses challenges when it comes to transitions. Is there a way to achieve a transition similar to the one shown in the CodePen link below without resorting to explicit widths?
<div id='has-implicit-width'>
<div class='text-element'>Some Text That Always Varies in Length</div>
</div>
.text-element {
padding: 12px;
}