Skip to content

Conversation

@ToMESSKa
Copy link
Contributor

@ToMESSKa ToMESSKa commented Jan 22, 2026

INSTUI-4815

ISSUE:

  • ToggleDetails needs to be migrated to the new theming system

TEST PLAN:

@ToMESSKa ToMESSKa self-assigned this Jan 22, 2026
@github-actions
Copy link

github-actions bot commented Jan 22, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2380/

Built to branch gh-pages at 2026-01-27 10:09 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Collaborator

@adamlobler adamlobler left a 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.

150% line-height set by the component style:
Image

150% line-height set in the inspector:
Image

@ToMESSKa ToMESSKa force-pushed the INSTUI-4815-toggle-details-rework branch from 019a6d9 to 56134fa Compare January 27, 2026 10:04
@ToMESSKa
Copy link
Contributor Author

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.

150% line-height set by the component style: Image

150% line-height set in the inspector: Image

@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.

@ToMESSKa ToMESSKa requested a review from adamlobler January 27, 2026 10:20
@git-nandor
Copy link
Contributor

git-nandor commented Jan 27, 2026

image

The icons appear slightly misaligned, and I don’t see any difference between the small and medium sizes.

@git-nandor
Copy link
Contributor

image

In the dark theme, the icons have incorrect colors.

@git-nandor
Copy link
Contributor

image

The filled variant has an incorrect background color, and the icons used for the expanded and closed states don’t match the designs in Figma.

Copy link
Contributor

@git-nandor git-nandor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments

Copy link
Collaborator

@adamlobler adamlobler left a 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.

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

Successfully merging this pull request may close these issues.

4 participants