.equationBox-cont { transform-origin: center; width: fit-content; > span { width: fit-content; } }