Flexbox Flashcards

1
Q

What is the default flex-direction of display: flex; ?

A

flex-direction: row; which causes elements to line up next to each other in a row of columns first, instead of a column of rows.

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

What does display: inline-flex; do?

A

Causes the element’s children to layout in flexbox and the element itself becomes and inline element.

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

True/False: justify-content works on the cross-axis

A

False

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

What CSS property works on the cross-axis alignment of the flex-items?

A

align-items

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

If an element has display: flex on it what is it and it’s children called?

A

Flex container and flex items, respectively.

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

How do you override align-items for a single flex item?

A

align-self

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

How many values of justify-content are there and what are they?

A

Thirteen:
start, end, flex-start, flex-end, center, baseline, space-evenly, space-around, space-between, stretch, left, right, normal

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

What’s the difference between space-between, space-around, space-evenly?

A

Between, puts the space evenly between the flex items. The first and last items are flush against the parent container edges.

Around is the same except the first and last items have a space of half the other distances between them and the parent edge.

Evenly is all spaces are the same.

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

True/False you can order the flex-items by putting the flex-order property on them.

A

False. It’s the order: property.

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

Flex-flow is shorthand for what properties?

A

Flex-direction and flex-wrap.

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

flex: is shorthand for what properties?

A

flex-grow, flex-shrink an flex-basis, in that order.

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

True/False: flex is a property for the flex-container.

A

False. flex actually is set on and determines the size of the flex-item.

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

What is the defaults for flex: ?

A

0 1 auto

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

What does flex-grow and flex-shrink do?

A

Set the flex grow and shrink factor of a flex-item.

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

What does flex-basis do?

A

It sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with box-sizing.

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

What has priority, flex-basis or width/height?

A

flex-basis, unless set to auto.