CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector, property, value
How are key/value pairs related to CSS?
properties and their values
color: pink
Name three different types of values you can use to specify colors in CSS
RGB, hex, color name
What are three important considerations for choosing fonts?
Readability, theme
Why must you have backup fonts assigned when selecting custom fonts?
in case the user browser does not support that font family
What CSS properties make up the box model?
margin, padding, border
Which CSS property pushes boxes away from each other?
Margin
Which CSS property pushes box content away from its border?
Padding
What purpose does the CSS Cascade serve?
Determine what styling is applied
What is source order?
Last css rule has most precedence
In what situations might you need to apply styling to a single element multiple times in one stylesheet?
mobile responsiveness??
What is the purpose of !important?
Make any property
have extreme precedence.
When is !important a good tool to use?
Almost never. CSS Libraries sometimes call for it.
What is specificity?
How the browser decides what element gets what styling
How is specificity calculated?
0-0-0 column being id-class-element
Why might CSS include this feature?
Makes a check and balance to source order
What is the order of selector strengths for CSS specificity (commonly referred to as the Specificity Hierarchy)?
element-class-id-inline-!important
What is the CSS Cascade?
all factors used by CSS to determine the styling applied (inheritance, specificity, source order)