digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
72 stars 35 forks source link

Min height or combination of line-height and padding to build button and similar components #1712

Open Febakke opened 5 months ago

Febakke commented 5 months ago

Draft While working with our new sizing we looked into how our buttons was built. Today we use min height to set the height of our buttons.

Skjermbilde 2024-03-18 kl  16 46 06

Min-height

pros:

Cons:

Skjermbilde 2024-03-18 kl  16 30 28

Design systems that use min-height: (as I understand the code 😅) designsystem.dk Punkt (Height) Jøkul (Height)

Combination of line-height and padding

pros

Cons:

Design systems that use this method: (as I understand the code 😅) Aksel designsystem.arbetsformedlingen.se Gov.uk

### Tasks
- [ ] https://github.com/digdir/designsystemet/issues/1726
- [ ] Consider to use only line-height to make the height of the components correct (remove min-height?)
Febakke commented 5 months ago

Image

Im a little lost on what we discussed last time, but couldent this work? 1.5 rem lineheight on all button components and ramp up padding and text size. If the size of line-height is not based on the text size within the button. @Thuneer