top | item 33276107

(no title)

LukeBMM | 3 years ago

An example might be helpful. Imagine you had buttons that come in small, medium, and large sizes. You want those buttons to have similar, proportional padding, letter-spacing, and border-radius. Margin around the buttons, however, should always be the same size to align with your columns or something.

You can put those properties which should vary in ems and then all you have to do is change the large and small font sizes from the default. Margin, however, remains in rems because it needs to be consistent. Everything will scale proportionately and your large and small button classes are clear, expressive, and concise.

https://codepen.io/LukeAtWork/pen/gOzNdRo

discuss

order

No comments yet.