Have you ever encountered a button with changing text upon being pressed? The transition in text leads to a shift in the button's width. Wouldn't it be amazing if one could smoothly transition the change in width of an element using a code snippet like the one below?
#el {
transition: width 150ms ease-out;
}
However, this method only applies when the width
property is explicitly modified.
Is there an inventive approach to achieving this effect? Check out this fiddle to experiment with it.