Skip to content

Ability to adjust the capsize spacing based on the font weight #211

Open
@DamianGlowala

Description

@DamianGlowala

I have been using this awesome library in a few projects, but there's always been one minor 'imperfection' I started to accept as a trade-off and for which there might be a solution.

For the default font weight, the metrics are pixel perfect. However, when the font becomes thinner or thicker, the capsize measurements for the normal font weight remain applied, instead of being able to adjust to this change. When font is bold, it's usually a bit taller, and vice versa.

Is this feasible to achieve? Could we potentially pass different font metrics for every font weight or be able to compute these based on a specific parameter and keep the changes in the config minimal? Not sure whether there's any sort of relativeness between font weights, or whether we would need unique measurements for each.

The whole idea appears to be very similar (at least I hope it is!) to how the capsize class already adjusts the spacing based on the font size.


Thank you for your work, it made transforming the designs into UIs using TailwindCSS much more predictable 💙

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions