Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: lineHeight can't accept length or percentage #2851

Open
crowbait opened this issue Aug 25, 2024 · 0 comments
Open

Docs: lineHeight can't accept length or percentage #2851

crowbait opened this issue Aug 25, 2024 · 0 comments

Comments

@crowbait
Copy link

crowbait commented Aug 25, 2024

In this issue it has been noted that lineHeight is limited to the unitless number value type (thus lineHeight = x * fontSize).

While this is not wrong behaviour, the usual CSS line height property also allows for other value types, eg. length.

This key difference should be noted in the docs.

Also, it may be prudent to change the type of lineHeight to number, as strings (commonly used in JSX styling for CSS values containing units) could lead to false confidence in the acceptable values of lineHeight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant