- 394comments
- 86comments
- 173comments
- 139comments
- 16comments
- 54comments
- 202comments
- 37comments
- 2comments
- 2comments
- 8comments
- 1comments
- 2comments
- 20comments
- 27comments
- 29comments
- 42comments
- 323comments
- 65comments
- 35comments
- 108comments
- 182comments
- 355comments
- 37comments
- 150comments
- —discuss
- 22comments
- 46comments
- 6comments
- 108comments
Recently found the lh unit approach. It’s elegant for centering icons along the first line in dynamic, sometimes wrapping text.
There's new CSS capabilities [0] that can help solve this problem better now via alignment-baseline [1] and text-box-trim [2].
[0] https://www.w3.org/TR/css-inline-3/#leading-trim
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...