Skip to content

Pixel line-height setting in iui-body considered harmful? #440

Answered by mayank99
tcobbs-bentley asked this question in Q&A
Discussion options

You must be logged in to vote

after upgrading from 2.19 to 3.0

I think you're referring to itwin-core. They started using itwinui in 3.0. So there is no "change" from our side.

Is this hard-coded pixel setting providing some advantage?

Setting line-height globally is a standard CSS practice because the default browser line-height is too small. What is debatable however is the use of a hardcoded pixel value. We are currently experimenting with switching to rem units in #424, so that should help a bit. We might also try using some fluid value (e.g. line-height: calc(1em + 0.5rem)) after researching a bit more.

my element contains large-ish text

Your concern about larger text is very valid, and this is an often tho…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tcobbs-bentley
Comment options

tcobbs-bentley Jan 7, 2022
Collaborator Author

@mayank99
Comment options

Answer selected by tcobbs-bentley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants