Grid Flashcards

1
Q

Which property creates gutters between grid columns?

A

grid-column-gap

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

Which property creates gutters between grid rows?

A

grid-row-gap

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

Which property creates grid rows?

A

grid-template-rows

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

Which property creates grid columns?

A

grid-template-columns

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

Shorthand property to create grid gaps.

A

grid-gap row-gap col-gap | rowcol-gap

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

Shorthand property to create grid templates.

A

grid-template

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

Share the available space equally between 3 grid columns.

A

grid-template-columns: 1fr 1fr 1fr;

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

Share the available space equally between 12 grid columns.

A

grid-template-columns: repeat(12, 1fr);

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

Reserve 50% of available space for the 1 grid column and share the rest between 2 more columns.

A

grid-template-columns: 50% repeat(2, 1fr);

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

Which properties can be replaced with shorthand property grid-area? (4 properties)

A

grid-row-start | grid-row-end | grid-column-start | grid-column-end

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

What is the shorhand for grid-row-start and grid-row-end properties

A

grid-row: #start / #end;

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

What is the shorhand for grid-column-start and grid-colum-end properties

A

grid-column: #start / #end;

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

What is the shorthand for grid-row and grid-column properties?

A

grid-area: #row-start / #col-start / #row-end / #col-end;

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

What is the first parameter of grid-area?

A

starting row line

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

What is the second parameter of grid-area?

A

starting column line

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

What is the third parameter of grid-area?

A

ending row line

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

What is the fourth parameter of grid-area?

A

ending column line

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

What is the first parameter of grid-row?

A

starting row line

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

What is the second parameter of grid-row?

A

ending row line

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

What is the first parameter of grid-column?

A

starting column line

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

What is the second parameter of grid-column?

A

ending column line

22
Q

Tell grid that an item should start from starting column line 1 and occupy 3 cells.

A

grid-column: 1 / span 3;

23
Q

Which property uses a name matrix to define grid areas?

A

grid-template-areas

24
Q

Can you left a cell empty when using grid-template-areas?

A

No it won’t work. However you can use a dot (.) to define an empty cell within the grid-template-areas strings.

25
Q

How can you tell grid-template-areas to left a cell empty?

A

Using a dot (.)

26
Q

Change the height of implicit rows of the grid to 150px

A

grid-auto-rows: 150px;

27
Q

By default grid inserts implicit rows, change this behavior to insert implicit columns.

A

grid-auto-flow: column;

28
Q

What is the default value of grid-auto-flow property?

A

row

29
Q

If you change the grid-auto-flow to column you should also replace the grid-auto-rows properties with […]

A

grid-auto-columns

30
Q

What is the default value of grids justify-items property

A

justify-items: strecth;

31
Q

Force items to fill the whole width of the grid cell (this is the default)

A

justify-items: strecth;

32
Q

Align grid items to be flush with the start edge of their cell.

A

justify-items: start;

33
Q

Which property aligns grid items along the row axis (a.k.a inline axis)?

A

justify-items

34
Q

Align items to be flush with the end edge of their grid cell.

A

justify-items: end;

35
Q

Align items in the center of their grid cell.

A

justify-items: center;

36
Q

Which property aligns grid items along the column (block ) axis?

A

align-items

37
Q

Force items to fill the whole height of the grid cell (this is the default).

A

align-items: stretch;

38
Q

Center items vertically in their grid cells

A

align-items: center;

39
Q

Aligns items to the bottom edge of their grid cell

A

align-items: end;

40
Q

Aligns items to the top edge of their grid cell

A

align-items: start;

41
Q

Which property aligns a individual grid item along the column (block ) axis?

A

align-self

42
Q

Which property aligns a individual grid item along the row (inline) axis?

A

justify-self

43
Q

Which properties are used to align grid tracks

A

justify-content | align-content

44
Q

Which property is used to align grid tracks horizontally

A

justify-content

45
Q

Which property is used to align grid tracks vertically

A

align-content

46
Q

Grid properties that brings flexbox alike behavior to grid tracks

A

justify-content (horizontally)

align-content (vertically)

47
Q

Special keyword that sets the width of a particular column of the grid to the same size as the widest element in the column.

A

grid-template-columns: max-content 1fr 1fr 1fr

do this for the first column

48
Q

Special keyword that brings the width of a particular column of the grid to the same size as the narrowest element in the column.

A

grid-template-columns: min-content 1fr 1fr 1fr

do this for the first column

49
Q

How can you assign a range width (min-max) to a grid column?

A

grid-template-columns: 1fr 1fr minmax(150px, 300px);

50
Q

Let’s say we have a 800px wide grid container.
Divide it into 10 columns of equal width so that when there are not enough elements to fill these columns, the extra space should be kept occupied filled with empty slots.

A

grid-template-columns: repeat(auto-fill, 80px);

51
Q

Let’s say we have a 800px wide grid container.
Divide it into 10 columns of equal width so that when there are not enough elements to fill these columns, the extra space should not occupy space collapsing the empty slots.

A

grid-template-columns: repeat(auto-fit, 80px);