Flexbox Flashcards

1
Q

flex-direction:

A

Sets the display direction of flex items:

row [default]
row-reverse
column
column-reverse

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

flex-wrap:

A

Specifies whether flex items should wrap or not:

wrap
nowrap (default)
wrap-reverse

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

flex-flow:

A

Shorthand for setting flex-direction then flex-wrap:

flex-flow: flex-direction flex-wrap

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

justify-content:

A

Align items on the x-axis/cross axis/horizontal axis:

flex-start [default]
flex-end
center
space-around
space-between
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

justify-content: flex-start

A

Display items at the beginning of the cross axis

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

justify-content: flex-end

A

Display items at the end of the cross axis

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

justify-content: center

A

Display items at the center of the cross axis

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

justify-content: space-around

A

Display items with space before, between, and after the items

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

justify-content: space-between

A

Display items on the cross axis with equal space between the items

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

align-items:

A

Align items on the y-axis/vertical axis:

center
flex-start
flex-end
stretch [default]
baseline
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

align-items: center

A

Display items in the middle of the y-axis

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

align-items: flex-start

A

Display items at the top of the y-axis

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

align-items: flex-end

A

Display items at the bottom of the y-axis

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

align-items: stretch

A

Stretches the items to fill the entire y-axis container (default)

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

align-items: baseline

A

Aligns items along their typographical baseline

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

align-content:

A

Align the flex lines between flex items:

space-between
space-around
stretch
center
flex-start
flex-end
17
Q

align-content:space-between

A

Displays flex lines with equal space between them

18
Q

align-content: space-around

A

Displays flex lines with equal space before, between, and after them

19
Q

align-content: stretch (default)

A

Stretches the flex lines to fill it’s y-axis container

20
Q

align-content: center

A

Displays the (group) of flex lines in the middle of the container

21
Q

APPLICATION:

Perfect Centering with Flexbox

A

SOLUTION

Set both justify-content and align-items to center

22
Q

FLEX ITEM:

order:

A

Specify the order of the flex item (zero based):

-1
0 [default]
1
2

23
Q

FLEX ITEM:

flex-grow:

A

Specify how much a flex item will grow relative to other flex items:

0 [default]
1
2 (2x as fast)
8 (8x as fast)

24
Q

FLEX ITEM:

flex-shrink:

A

Specify how much a flex item will shrink relative to other flex items:

0
1 [default]

25
Q

FLEX ITEM:

flex-basis:

A

Specify the initial length (width) of a flex item:

50px
50rem
50%

26
Q

FLEX ITEM:

flex:

A

Shorthand property for flex-grow, flex-shrink, and flex-basis

flex: 1 0 50%
flex: [flex-grow] [flex-shrink] [flex-basis]

27
Q

FLEX ITEM:

align-self:

A

Specify the alignment for the selected item inside the flex container:

baseline
stretch
center
flex-start
flex-end