Gotcha Explanation:
The `leading-*` classes adjust `line-height`. This affects the total height of the text element. When trying to vertically align text with other elements (like icons) using flexbox (`items-center`), the alignment is based on the text element's *entire bounding box*, not necessarily its baseline or visual center. This can lead to perceived misalignment, especially with larger or smaller line heights.
This text has `leading-tight`. While `items-center` is used, the icon might appear slightly off vertically compared to the visual bulk of the text due to the compressed line height affecting the text block's total height. Compare this with the example below.
This text has `leading-relaxed`. The increased line height makes the text block taller. Notice how `items-center` aligns the icon differently relative to the text's perceived center compared to the `leading-tight` example. The icon is centered relative to the *entire box occupied by the text*, which is now taller.
Addressing the Gotcha: When precise vertical alignment is critical, you might need to: