-
Notifications
You must be signed in to change notification settings - Fork 0
/
_flexbox-mixins.scss
79 lines (66 loc) · 1.48 KB
/
_flexbox-mixins.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
@mixin flexbox() {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
@mixin align-items($v) {
-webkit-align-items: $v;
align-items: $v;
}
// flex is shorthand declaration
// flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
@mixin flex($v) {
-webkit-box-flex: $v;
-moz-box-flex: $v;
-webkit-flex: $v;
-ms-flex: $v;
flex: $v;
}
@mixin flex-basis($v) {
-webkit-flex-basis: $v;
flex-basis: $v;
}
@mixin flex-direction($v) {
-webkit-flex-direction: $v;
flex-direction: $v;
}
@mixin flex-flow($v) {
-webkit-flex-flow: $v;
flex-flow: $v;
}
@mixin flex-grow($v) {
-webkit-flex-grow: $v;
flex-grow: $v;
}
@mixin flex-shrink($v) {
-webkit-flex-shrink: $v;
flex-shrink: $v;
}
@mixin flex-wrap($v) {
-webkit-flex-wrap: $v;
flex-wrap: $v;
}
@mixin justify-content($v) {
-webkit-justify-content: $v;
justify-content: $v;
}
// ==== Children element flexbox styles ====//
// Order in which they collapse
@mixin order($v) {
-webkit-box-ordinal-group: $v;
-moz-box-ordinal-group: $v;
-ms-flex-order: $v;
-webkit-order: $v;
order: $v;
}
// Override parent alignment
@mixin align-self($v) {
-webkit-align-self: $v;
align-self: $v;
}
// Align item to the right
@mixin flex-right {
margin-left: auto;
}