_flex.scss
1.38 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
/* ==================
弹性布局
==================== */
.flex {
display: flex !important;
&-sub {
flex: 1 !important;
}
&-twice {
flex: 2 !important;
}
&-treble {
flex: 3 !important;
}
&-column {
flex-direction: column !important;
}
&-row {
flex-direction: row !important;
}
&-column-reverse {
flex-direction: column-reverse !important;
}
&-row-reverse {
flex-direction: row-reverse !important;
}
&-wrap {
flex-wrap: wrap !important;
}
&-center {
@include flex-center;
}
&-bar {
@include flex-bar;
}
}
.basis {
@each $class, $value in (xs: 20%, sm: 40%, df: 50%, lg: 60%, xl: 80%) {
&-#{$class} {
flex-basis: $value !important;
}
}
}
.align {
@each $class,
$value
in (start: flex-start, end: flex-end, center: center, stretch: stretch, baseline: baseline)
{
&-#{$class} {
align-items: $value !important;
}
}
}
.self {
@each $class,
$value
in (start: flex-start, end: flex-end, center: center, stretch: stretch, baseline: baseline)
{
&-#{$class} {
align-self: $value !important;
}
}
}
.justify {
@each $class,
$value
in (
start: flex-start,
end: flex-end,
center: center,
between: space-between,
around: space-around
)
{
&-#{$class} {
justify-content: $value !important;
}
}
}