-
Notifications
You must be signed in to change notification settings - Fork 173
/
Copy path_base_grid-definitions.scss
130 lines (105 loc) · 3.36 KB
/
_base_grid-definitions.scss
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@mixin vf-b-row-reset {
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
@mixin vf-b-grid-definitions {
%display-block {
// make columns explicitly display:block; the use of a placeholder is to ensure the rule appears only once in the compiled css
display: block;
}
%fixed-width-container--common-properties {
@extend %vf-grid-container-padding;
margin-left: auto;
margin-right: auto;
width: 100%;
}
%fixed-width-container {
@extend %fixed-width-container--common-properties;
max-width: $grid-max-width;
& & {
@include vf-b-row-reset;
}
}
// Deprecated, use new 4/4/8 grid %vf-grid-row instead
%vf-row {
@extend %fixed-width-container;
@supports (display: grid) {
display: grid;
grid-gap: 0 map-get($grid-gutter-widths, small);
grid-template-columns: repeat($grid-columns-small, minmax(0, 1fr));
grid-template-rows: auto;
margin-left: auto;
margin-right: auto;
max-width: $grid-max-width;
& > * {
grid-column-end: span $grid-columns-small;
}
[class*='#{$grid-column-prefix}'] {
grid-column-start: auto;
}
// set static gutter width per breakpoint
@media (min-width: $threshold-4-6-col) {
grid-gap: 0 map-get($grid-gutter-widths, default);
grid-template-columns: repeat($grid-columns-medium, minmax(0, 1fr));
& > * {
grid-column-end: span $grid-columns-medium;
}
}
@media (min-width: $threshold-6-12-col) {
grid-gap: 0 map-get($grid-gutter-widths, default);
grid-template-columns: repeat($grid-columns, minmax(0, 1fr));
& > * {
grid-column-end: span $grid-columns;
}
}
}
}
%vf-grid-row {
@extend %fixed-width-container;
@supports (display: grid) {
display: grid;
grid-gap: 0 map-get($grid-gutter-widths, small);
grid-template-columns: repeat($grid-8-columns-small, minmax(0, 1fr));
grid-template-rows: auto;
margin-left: auto;
margin-right: auto;
max-width: $grid-max-width;
& > * {
grid-column-end: span $grid-8-columns-small;
}
[class*='#{$grid-8-column-prefix}'] {
grid-column-start: auto;
}
// set static gutter width per breakpoint
@media (min-width: $threshold-4-6-col) {
grid-gap: 0 map-get($grid-gutter-widths, default);
grid-template-columns: repeat($grid-8-columns-medium, minmax(0, 1fr));
& > * {
grid-column-end: span $grid-8-columns-medium;
}
}
@media (min-width: $threshold-6-12-col) {
grid-gap: 0 map-get($grid-gutter-widths, default);
grid-template-columns: repeat($grid-8-columns, minmax(0, 1fr));
& > * {
grid-column-end: span $grid-8-columns;
}
}
}
}
%vf-grid-container-padding {
// set static outside padding per breakpoint
padding-left: map-get($grid-margin-widths, small);
padding-right: map-get($grid-margin-widths, small);
@media (min-width: $threshold-4-6-col) {
padding-left: map-get($grid-margin-widths, default);
padding-right: map-get($grid-margin-widths, default);
}
@media (min-width: $threshold-6-12-col) {
padding-left: map-get($grid-margin-widths, default);
padding-right: map-get($grid-margin-widths, default);
}
}
}