Repository navigation
Expand file tree
/
Copy pathgrid.scss
More file actions
70 lines (69 loc) · 2.42 KB
/
Copy pathgrid.scss
File metadata and controls
70 lines (69 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@import '../shared/layout';
// Most grid constants are in _layout.scss because a lot of core breakpoints
// are based on the grid metrics
// Styles applying to both fixed and single grids
fci-grid,
[fci-grid] {
display: flex;
flex-direction: row;
margin: 0 auto;
flex-wrap: wrap;
[fci-cell] {
box-sizing: border-box;
}
}
// Layout for fixed grids
fci-grid,
[fci-grid] {
// Narrow canvases (full-width grid cells)
@include narrowCanvas {
width: 100%;
padding: 0 ($GRID_MARGIN_NARROW / 2);
box-sizing: border-box; // At 100%, include the padding in our size calc
[fci-cell] {
margin: 0 ($GRID_MARGIN_NARROW / 2) ($GRID_MARGIN_NARROW) ($GRID_MARGIN_NARROW / 2);
width: 100%;
} // Define partial sizes for columnNumber < totalColumns.
@for $i from 1 through ($GRID_NARROW_COLUMNS - 1) {
[fci-cell="#{$i}"] {
width: 100%;
}
} // Define 100% for everything else.
@for $i from $GRID_NARROW_COLUMNS through $GRID_WIDE_COLUMNS {
[fci-cell="#{$i}"] {
width: 100%;
}
}
} // Medium canvases (~8 cols)
@include mediumCanvas {
width: gridCellWidth($GRID_MEDIUM_COLUMNS) + $GRID_MARGIN;
padding: 0 ($GRID_MARGIN / 2);
[fci-cell] {
margin: 0 ($GRID_GUTTER / 2) ($GRID_GUTTER) ($GRID_GUTTER / 2);
width: gridCellWidth($GRID_MEDIUM_COLUMNS);
} // Define partial sizes for columnNumber < totalColumns.
@for $i from 1 through ($GRID_MEDIUM_COLUMNS - 1) {
[fci-cell="#{$i}"] {
width: gridCellWidth($i);
}
} // Define 100% for everything else.
@for $i from $GRID_MEDIUM_COLUMNS through $GRID_WIDE_COLUMNS {
[fci-cell="#{$i}"] {
width: gridCellWidth($GRID_MEDIUM_COLUMNS);
}
}
} // Wide canvases (~12 cols)
@include wideCanvas {
width: gridCellWidth($GRID_WIDE_COLUMNS) + $GRID_MARGIN;
padding: 0 ($GRID_MARGIN / 2);
[fci-cell] {
margin: 0 ($GRID_GUTTER / 2) ($GRID_GUTTER) ($GRID_GUTTER / 2);
width: gridCellWidth($GRID_WIDE_COLUMNS);
} // Define partial sizes for all numbers of columns.
@for $i from 1 through $GRID_WIDE_COLUMNS {
[fci-cell="#{$i}"] {
width: gridCellWidth($i);
}
}
}
}