USStateDept / State-TalentMAP

A comprehensive research, bidding, and matching system to match Foreign Service employees with the right skills to available posts and positions. API Layer - https://github.com/USStateDept/State-TalentMAP-API
Other
31 stars 16 forks source link

Review Sass Strategy #1078

Open burgwyn opened 6 years ago

burgwyn commented 6 years ago
jseppi commented 6 years ago

Here's some advice I've gotten on the em vs rem vs px stuff:

Typically I use rem for font-related sizing, because rem is derived from the font-size set on html. That font size is usually 10px at 18F (so 1.6rem == 16px). I always want an h3 to be the same, regardless of the size of its parent element’s font-size, so this works well for that application.

OTOH, em sizes are relative to their parent containers’ font-size. I use em for things like margin and padding, so that I can set them relative to the current font size instead of setting them to an absolute value. This helps with resizing things responsively and when the user zooms, because changing a font size of an element should also change margin/padding/etc. It’s definitely not a perfect trick, but it works pretty well for a lot of things.