-
Notifications
You must be signed in to change notification settings - Fork 107
feat(ui-toggle-details): rework ToggleDetails #2380
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
base: v12
Are you sure you want to change the base?
Conversation
|
adamlobler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure why, but when I set the line-height of the toggleDetails content to 150% in the inspector, it looks good. However, when it gets the same value from the toggleDetails style, it appears much smaller. It looks like the 150% is not connected to the element's font-size its 150% of some general font-size.
INSTUI-4815
019a6d9 to
56134fa
Compare
@adamlobler I fixed this, can you please check it? The problem was that the token's value changed form a unitless to a percentage value. When line-height is unitless (like 1.5), the number itself is inherited, not the computed px value. This lets each child element calculate its line-height based on its own font size. However, using a percentage (like 150%) means the parent’s computed line-height value is passed down and applied directly to children, regardless of children's font size. https://stackoverflow.com/questions/20695333/why-does-unitless-line-height-behave-differently-from-percentage-or-em-in-this-e I applied the token to the all the children elements instead if the parent. |
git-nandor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments
adamlobler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line-height looks great, thanks for the modifications! 🙌 Other than the icon misalignment that Nandi mentioned, I think it’s going to be okay, the other issues are related to the button component, which we should fix there.







INSTUI-4815
ISSUE:
TEST PLAN: