Typography Flashcards
Should we set the default font-size to a pixel value in our html style rule?
Generally no, as this can over-ride a user selected value. It is more appropriate, if necessary, to set a html font-size rule to a rem (relative em, based on the root element) value.
What units of measure do we generally use with typography in CSS
REM - Generally.
What are the different use cases for font-weight: bold vs the “Strong” tag in HTML?
The HTML “Strong” tag should be used to convey that an element’s contents are critically important to the reader.
The font-weight: bold (or font-weight: 700) is usually used more often to differentiate something visually.
Why might we use text-transform: as a declaration?
We might set text-transform: uppercase or text-transform: capitalize to change the casing of a block of text.
We do this instead of changing HTML because of the increased flexibility and future proofing.
What units are used for line-height in CSS?
None, line-height is a unitless attribute. The single number or decimal is a ratio.
What is the default line-height for Chrome and FireFox?
Chrome is 1.15
Firefox is 1.20
If we want to control the spacing within our typography, what technique might be use?
We might do a reset to all margin and padding to our heading elements and our p elements, and then add back in margin top and bottom to the heading, and then padding bottom to the paragraph elements.
If we are utilizing all-cap for a title or sub-title, what might we consider doing to make it more legible?
We might increase letter-spacing a bit to increase separation of letters.
If we want to separate text blocks, what would Kevin recommend?
He would recommend adding
margin-bottom to push the other text block away.
Why might using the em relative sizing values cause problems?
Using ems for font-size can cause a cascading effect on the growth or shrinkage of font because em is based on the parent element’s font-size. This is especially problematic with lists.