CSS Units Flashcards

1
Q

Can whitespace appear between a number and its unit?

A

No, must be continuous
60px
2rem
etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the absolute lengths in CSS?

A

pixels px : 1/96th of an inch

points pt : 1 /72nd of an inch

pica pc : 1/6th of an inch [12 points, 16 pixels]

inch. in : 96 pixels, 72 points, 6 picas, 2.54cm

millimeters, centimeters [ mm, cm ]
Q : quarter-millimeters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is 2% ?

A

A unit that is 2% “relative” to the parent element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is { font-size: 2em; }?

A

A unit that will be 2x the font-size of it’s parent declaration.
**can cascade and cause unexpected results
“em” element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is { font-size: 1.5rem; }?

A

A unit that is 1.5x times the size of the root element
**more consistent than “em”
“rem” root element html element or :root

16px is the default root font-size, media queries will always refer to this.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are lh and rlh

A

Line height and root line height

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are vw and vh?

A

1% of the viewport-width and viewport-height respectively

10vw would be 10% of the viewport-width

small viewport { svw, svh }
large viewport { lvw, lvh }
dynamic { dvw, dvh }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

vb vs vi

A

vb is a unit relative to the containing block towards the root element’s block axis

vi is a unit relative to the containing block on the inline axis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly