miljodir / md-components

Design-komponenter for Miljødirektoratet (CSS og React)
https://miljodir.github.io/md-components
MIT License
3 stars 2 forks source link

button resizing fix #29

Closed kajsaeggum closed 11 months ago

kajsaeggum commented 12 months ago

Describe your changes

Changed unit for height, width, right and left on both icon classes so that size and positioning of icon is adjusted accordingly, when font size on the button changes. This is to avoid the current problem, where the icon stays small and wrongly positioned in relation to the text of the button when text has been increased in the user's browser: image

Also added flex-shrink: 0 to both icon classes so that icons won't shrink in size if the button is pressed for available space. Reproduceable when minimizing the browser window so that button text wraps across rows: image

Checklist before requesting a review