Flexbox Properties Flashcards

1
Q

What’s the purpose of flexbox?

A

allow items to best fill the space available or prevent overflow
“direction-agnostic” aka has no particular base of direction

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

Flexbox Layout

A

Main axis: primary axis where items are laid out, not always horizontal, depends on flex direction
Main size: flex item’s width or height
Cross-axis: axis perpendicular to the main axis
cross-size: flex item’s width or height in the cross direction

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

display: flex;

A

defines a flex container

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

flex-direction:

A

establishes the main-axis and defines the direction items are placed in the container
flex-direction: row –> default, left to right in ltr and right to left in rtl
flex-direction: row-reverse –> right to left in ltr and left to right in rtl
flex-direction: column –> same as row but top to bottom
flex-direction: column-reverse –> same as row reverse but bottom to top

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

flex-wrap:

A

by default, flex items will try to fit in one line
flex-wrap: nowrap –> default
flex-wrap: wrap –> items will wrap onto multiple lines
flex-wrap: wrap-reverse –> flex items will wrap onto multiple lines from bottom to top

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

flex-flow:

A

shorthand for both flex-direction & flex-wrap

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

justify-content:

A
defines alignment along the main axis
justify-content: flex-start;
justify-content: flex-end;
justify-content: flex-center;
there are more but these are "safest" for browsers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

align-items

A
defines how flex items are laid out along the cross axis
align-items: flex-start;
align-items: flex-end;
align-items: center;
align-items: stretch;
align-items: baseline;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

align-content:

A

aligns a flex container’s lines within when there is extra space in the cross-axis

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

gap, row-gap, column-gap:

A

gap property controls the space between flex items
only applies to the spacing BETWEEN items, not the outer edges
not exclusively for flexbox

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