-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path_grid.scss
More file actions
92 lines (81 loc) · 1.93 KB
/
_grid.scss
File metadata and controls
92 lines (81 loc) · 1.93 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*-------------------------*/
/* +GRID */
/*-------------------------*/
// Container for each row
.fx-row {
margin-top: -($fx-grid-gutter) + px;
margin-left: -($fx-grid-gutter / 2) + px;
margin-right: -($fx-grid-gutter / 2) + px;
display: flex;
flex-wrap: wrap;
+ .fx-row {
margin-top: 0;
}
}
// Alignement of items. Use with .fx-row
@each $position, $value in $fx-row-position {
.fx-row-#{$position}-xs {
justify-content: $value;
}
}
@each $breakpoint, $value in $fx-grid-breakpoints {
@include fx-bp($value) {
@each $position, $value in $fx-row-position {
.fx-row-#{$position}-#{$breakpoint} {
justify-content: $value;
}
}
}
}
// Reversed row. Use with .fx-row
.fx-row-reverse-xs {
flex-direction: row-reverse;
}
@each $breakpoint, $value in $fx-grid-breakpoints {
@include fx-bp($value) {
.fx-row-reverse-#{$breakpoint} {
flex-direction: row-reverse;
}
}
}
// Global settings for columns
[class*="fx-col"] {
margin-top: $fx-grid-gutter + px;
padding-left: ($fx-grid-gutter / 2) + px;
padding-right: ($fx-grid-gutter / 2) + px;
flex-grow: 1;
}
// Different column sizes
@each $size in $fx-column-sizes {
$roundsize: floor($size);
.fx-col-#{$roundsize}-xs {
flex-basis: $size * 1%;
max-width: $size * 1%;
}
}
@each $breakpoint, $value in $fx-grid-breakpoints {
@include fx-bp($value) {
@each $size in $fx-column-sizes {
$roundsize: floor($size);
.fx-col-#{$roundsize}-#{$breakpoint} {
flex-basis: $size * 1%;
max-width: $size * 1%;
}
}
}
}
// Align item to the top, center, or bottom
@each $position, $value in $fx-col-position {
.fx-col-#{$position}-xs {
align-self: $value;
}
}
@each $breakpoint, $value in $fx-grid-breakpoints {
@include fx-bp($value) {
@each $position, $value in $fx-col-position {
.fx-col-#{$position}-#{$breakpoint} {
align-self: $value;
}
}
}
}