oo-loop 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/loop.css +189 -625
- package/dist/loop.min.css +1 -1
- package/package.json +4 -3
- package/scss/_loop.scss +23 -27
- package/scss/_variables.scss +6 -2
- package/scss/base/_base.scss +11 -19
- package/scss/base/_type.scss +27 -63
- package/scss/components/_button.scss +56 -84
- package/scss/components/_columns.scss +69 -89
- package/scss/components/_form.scss +5 -7
- package/scss/components/_grid.scss +50 -62
- package/scss/components/form/_checkbox.scss +33 -41
- package/scss/components/form/_input.scss +12 -74
- package/scss/components/form/_mixin.scss +47 -0
- package/scss/components/form/_radio.scss +27 -34
- package/scss/components/form/_select.scss +38 -46
- package/scss/components/form/_toggle.scss +21 -30
- package/scss/functions/_array.scss +12 -8
- package/scss/functions/_empty.scss +6 -3
- package/scss/functions/_index.scss +7 -0
- package/scss/functions/_map.scss +4 -2
- package/scss/functions/_replace.scss +7 -4
- package/scss/functions/_split.scss +10 -6
- package/scss/functions/_type.scss +5 -3
- package/scss/mixins/_breakpoint.scss +12 -22
- package/scss/mixins/_loop.scss +28 -22
- package/scss/utilities/_color.scss +9 -18
- package/scss/utilities/_container.scss +9 -10
- package/scss/utilities/_float.scss +7 -11
- package/scss/utilities/_list.scss +9 -14
- package/scss/utilities/_spacing.scss +29 -40
- package/scss/utilities/_text.scss +19 -64
- package/scss/utilities/_visibility.scss +10 -9
- package/scss/utilities/_wrapper.scss +5 -10
- package/scss/base/_all.scss +0 -9
- package/scss/functions/_all.scss +0 -9
- package/scss/mixins/_all.scss +0 -7
|
@@ -1,64 +1,36 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../variables' as v;
|
|
4
|
+
@use '../functions' as fn;
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
* Button
|
|
5
8
|
*/
|
|
6
|
-
$btn-colors: () !default;
|
|
7
|
-
$btn-colors-classes: $colors-classes !default;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
$btn-bgcolor: #fff !default;
|
|
12
|
-
$btn-bgcolor-hover: darken($btn-bgcolor, 10%) !default;
|
|
13
|
-
$btn-bgcolor-active: darken($btn-bgcolor, 12%) !default;
|
|
14
|
-
$btn-border-color: #eee !default;
|
|
15
|
-
|
|
16
|
-
$btn-padding: .415em 1.2em !default; // relative to the size of the button
|
|
17
|
-
$btn-padding-sizes: () !default;
|
|
18
|
-
|
|
19
|
-
$btn-font-family: $font-family-base !default;
|
|
20
|
-
$btn-font-size: $font-size-base !default;
|
|
21
|
-
$btn-font-weight: 700 !default;
|
|
22
|
-
$btn-text-transform: initial !default;
|
|
23
|
-
$btn-border-radius: .2em !default; // relative to the size of the button
|
|
24
|
-
$btn-box-shadow: 1px 1px 1px 0 #999!default;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
$btn-outline-colors: $btn-colors !default;
|
|
28
|
-
$btn-outline-colors-classes: $btn-colors-classes !default;
|
|
29
|
-
|
|
30
|
-
$btn-outline-color: $btn-color !default; // set inherit to get the colors from the borders
|
|
31
|
-
$btn-outline-padding: $btn-padding !default;
|
|
32
|
-
$btn-outline-font-family: $btn-font-family !default;
|
|
33
|
-
$btn-outline-font-weight: $btn-font-weight !default;
|
|
34
|
-
$btn-outline-text-transform: $btn-text-transform !default;
|
|
35
|
-
$btn-outline-box-shadow: none !default;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
[#{$loop-component-prefix}-button] {
|
|
39
|
-
padding: $btn-padding;
|
|
10
|
+
[#{v.$loop-component-prefix}-button] {
|
|
11
|
+
padding: v.$btn-padding;
|
|
40
12
|
display: inline-block;
|
|
41
13
|
|
|
42
|
-
color:
|
|
14
|
+
color: v.$btn-color;
|
|
43
15
|
line-height: 1.4;
|
|
44
16
|
// letter-spacing: .05rem;
|
|
45
17
|
|
|
46
|
-
font-family:
|
|
47
|
-
font-size:
|
|
48
|
-
font-weight:
|
|
18
|
+
font-family: v.$btn-font-family;
|
|
19
|
+
font-size: v.$btn-font-size;
|
|
20
|
+
font-weight: v.$btn-font-weight;
|
|
49
21
|
|
|
50
22
|
text-align: center;
|
|
51
23
|
text-decoration: none !important;
|
|
52
|
-
@if
|
|
53
|
-
text-transform:
|
|
24
|
+
@if v.$btn-text-transform != initial {
|
|
25
|
+
text-transform: v.$btn-text-transform;
|
|
54
26
|
}
|
|
55
27
|
vertical-align: middle;
|
|
56
28
|
// white-space: nowrap;
|
|
57
29
|
|
|
58
|
-
border: 1px solid
|
|
59
|
-
border-radius:
|
|
60
|
-
background-color:
|
|
61
|
-
box-shadow:
|
|
30
|
+
border: 1px solid v.$btn-border-color;
|
|
31
|
+
border-radius: v.$btn-border-radius;
|
|
32
|
+
background-color: v.$btn-bgcolor;
|
|
33
|
+
box-shadow: v.$btn-box-shadow;
|
|
62
34
|
|
|
63
35
|
cursor: pointer;
|
|
64
36
|
user-select: none;
|
|
@@ -72,12 +44,12 @@ $btn-outline-box-shadow: none !default;
|
|
|
72
44
|
|
|
73
45
|
&:hover,
|
|
74
46
|
&:focus {
|
|
75
|
-
color:
|
|
76
|
-
background-color:
|
|
47
|
+
color: v.$btn-color-hover;
|
|
48
|
+
background-color: v.$btn-bgcolor-hover;
|
|
77
49
|
}
|
|
78
50
|
&:active {
|
|
79
|
-
background-color:
|
|
80
|
-
box-shadow: inset 1px 1px 1px 0 color.adjust(
|
|
51
|
+
background-color: v.$btn-bgcolor-active;
|
|
52
|
+
box-shadow: inset 1px 1px 1px 0 color.adjust(v.$btn-bgcolor, $lightness: -20%);
|
|
81
53
|
}
|
|
82
54
|
|
|
83
55
|
&.full {
|
|
@@ -87,15 +59,15 @@ $btn-outline-box-shadow: none !default;
|
|
|
87
59
|
}
|
|
88
60
|
|
|
89
61
|
@mixin paintButton($color-value) {
|
|
90
|
-
color: if(isBright($color-value),
|
|
62
|
+
color: if(fn.isBright($color-value), v.$color-base, #fff);
|
|
91
63
|
background-color: $color-value;
|
|
92
64
|
|
|
93
|
-
@if
|
|
65
|
+
@if v.$btn-border-color != transparent {
|
|
94
66
|
border-color: $color-value;
|
|
95
67
|
}
|
|
96
68
|
&:hover,
|
|
97
69
|
&:focus {
|
|
98
|
-
color: if(isBright($color-value),
|
|
70
|
+
color: if(fn.isBright($color-value), v.$color-base, #fff);
|
|
99
71
|
border-color: color.adjust($color-value, $lightness: -10%);
|
|
100
72
|
background-color: color.adjust($color-value, $lightness: -10%);
|
|
101
73
|
}
|
|
@@ -106,75 +78,75 @@ $btn-outline-box-shadow: none !default;
|
|
|
106
78
|
}
|
|
107
79
|
}
|
|
108
80
|
|
|
109
|
-
@if isNotEmpty(
|
|
110
|
-
@each $color in
|
|
111
|
-
[#{
|
|
112
|
-
@include paintButton(map
|
|
81
|
+
@if fn.isNotEmpty(v.$btn-colors-classes) {
|
|
82
|
+
@each $color in v.$btn-colors-classes {
|
|
83
|
+
[#{v.$loop-component-prefix}-button~="#{$color}"] {
|
|
84
|
+
@include paintButton(map.get(v.$colors, $color));
|
|
113
85
|
}
|
|
114
86
|
}
|
|
115
87
|
}
|
|
116
88
|
|
|
117
|
-
@if isNotEmpty(
|
|
118
|
-
@each $name, $value in
|
|
119
|
-
[#{
|
|
89
|
+
@if fn.isNotEmpty(v.$btn-colors) and fn.isMap(v.$btn-colors) {
|
|
90
|
+
@each $name, $value in v.$btn-colors {
|
|
91
|
+
[#{v.$loop-component-prefix}-button~="#{$name}"] {
|
|
120
92
|
@include paintButton($value);
|
|
121
93
|
}
|
|
122
94
|
}
|
|
123
95
|
}
|
|
124
96
|
|
|
125
97
|
@mixin paintButtonOutline($color-value) {
|
|
126
|
-
@if
|
|
98
|
+
@if v.$btn-outline-color == inherit {
|
|
127
99
|
color: $color-value;
|
|
128
100
|
}
|
|
129
101
|
border-color: $color-value;
|
|
130
102
|
|
|
131
103
|
&:hover,
|
|
132
104
|
&:focus {
|
|
133
|
-
color: if(isBright($color-value),
|
|
105
|
+
color: if(fn.isBright($color-value), v.$color-base, #fff);
|
|
134
106
|
border-color: color.adjust($color-value, $lightness: -10%);
|
|
135
107
|
background-color: color.adjust($color-value, $lightness: -10%);
|
|
136
108
|
}
|
|
137
109
|
&:active {
|
|
138
|
-
color: if(isBright($color-value),
|
|
110
|
+
color: if(fn.isBright($color-value), v.$color-base, #fff);
|
|
139
111
|
border-color: color.adjust($color-value, $lightness: -12%);
|
|
140
112
|
background-color: color.adjust($color-value, $lightness: -12%);
|
|
141
113
|
box-shadow: inset 1px 1px 1px 0 color.adjust($color-value, $lightness: -25%);
|
|
142
114
|
}
|
|
143
115
|
}
|
|
144
116
|
|
|
145
|
-
@if isNotEmpty(
|
|
146
|
-
[#{
|
|
117
|
+
@if fn.isNotEmpty(v.$btn-outline-colors-classes) or (fn.isNotEmpty(v.$btn-outline-colors) and fn.isMap(v.$btn-outline-colors)) {
|
|
118
|
+
[#{v.$loop-component-prefix}-button~="outline"] {
|
|
147
119
|
background-color: transparent;
|
|
148
120
|
|
|
149
|
-
@if
|
|
150
|
-
padding:
|
|
121
|
+
@if v.$btn-outline-padding != v.$btn-padding {
|
|
122
|
+
padding: v.$btn-outline-padding
|
|
151
123
|
}
|
|
152
|
-
@if
|
|
153
|
-
font-family:
|
|
124
|
+
@if v.$btn-outline-font-family != v.$btn-font-family {
|
|
125
|
+
font-family: v.$btn-outline-font-family
|
|
154
126
|
}
|
|
155
|
-
@if
|
|
156
|
-
font-weight:
|
|
127
|
+
@if v.$btn-outline-font-weight != v.$btn-font-weight {
|
|
128
|
+
font-weight: v.$btn-outline-font-weight
|
|
157
129
|
}
|
|
158
|
-
@if
|
|
159
|
-
text-transform:
|
|
130
|
+
@if v.$btn-outline-text-transform != v.$btn-text-transform {
|
|
131
|
+
text-transform: v.$btn-outline-text-transform
|
|
160
132
|
}
|
|
161
|
-
@if
|
|
162
|
-
color:
|
|
133
|
+
@if v.$btn-outline-color != inherit {
|
|
134
|
+
color: v.$btn-outline-color;
|
|
163
135
|
}
|
|
164
|
-
@if
|
|
165
|
-
box-shadow:
|
|
136
|
+
@if v.$btn-box-shadow != v.$btn-outline-box-shadow {
|
|
137
|
+
box-shadow: v.$btn-outline-box-shadow;
|
|
166
138
|
}
|
|
167
139
|
|
|
168
|
-
@if isNotEmpty(
|
|
169
|
-
@each $color in
|
|
170
|
-
&[#{
|
|
171
|
-
@include paintButtonOutline(map
|
|
140
|
+
@if fn.isNotEmpty(v.$btn-outline-colors-classes) {
|
|
141
|
+
@each $color in v.$btn-outline-colors-classes {
|
|
142
|
+
&[#{v.$loop-component-prefix}-button~="#{$color}"] {
|
|
143
|
+
@include paintButtonOutline(map.get(v.$colors, $color));
|
|
172
144
|
}
|
|
173
145
|
}
|
|
174
146
|
}
|
|
175
|
-
@if isNotEmpty(
|
|
176
|
-
@each $name, $value in
|
|
177
|
-
&[#{
|
|
147
|
+
@if fn.isNotEmpty(v.$btn-outline-colors) and fn.isMap(v.$btn-outline-colors) {
|
|
148
|
+
@each $name, $value in v.$btn-colors {
|
|
149
|
+
&[#{v.$loop-component-prefix}-button~="#{$name}"] {
|
|
178
150
|
@include paintButtonOutline($value);
|
|
179
151
|
}
|
|
180
152
|
}
|
|
@@ -182,9 +154,9 @@ $btn-outline-box-shadow: none !default;
|
|
|
182
154
|
}
|
|
183
155
|
}
|
|
184
156
|
|
|
185
|
-
@if isNotEmpty(
|
|
186
|
-
@each $name, $padding in
|
|
187
|
-
[#{
|
|
157
|
+
@if fn.isNotEmpty(v.$btn-padding-sizes) {
|
|
158
|
+
@each $name, $padding in v.$btn-padding-sizes {
|
|
159
|
+
[#{v.$loop-component-prefix}-button~="#{$name}"] {
|
|
188
160
|
padding: #{$padding};
|
|
189
161
|
}
|
|
190
162
|
}
|
|
@@ -1,35 +1,18 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
1
2
|
@use 'sass:math';
|
|
3
|
+
@use '../variables' as v;
|
|
4
|
+
@use '../functions' as fn;
|
|
5
|
+
@use '../mixins/breakpoint';
|
|
2
6
|
|
|
3
7
|
/**
|
|
4
8
|
* Column
|
|
5
9
|
*/
|
|
6
10
|
|
|
7
|
-
$columns-gutter: 2.4rem !default;
|
|
8
|
-
$columns-system: 12 !default;
|
|
9
|
-
$use-columns-order: true !default;
|
|
10
|
-
$use-columns-offset: false !default;
|
|
11
|
-
$use-columns-alignment: true !default;
|
|
12
|
-
$use-columns-self-alignment: true !default;
|
|
13
|
-
$use-columns-child-alignment: true !default;
|
|
14
|
-
|
|
15
|
-
$use-columns-alignment-breakpoints: true !default;
|
|
16
|
-
$use-columns-self-alignment-breakpoints: true !default;
|
|
17
|
-
$use-columns-self-adjustment-breakpoints: false !default;
|
|
18
|
-
|
|
19
|
-
$columns-gutter-sizes: (
|
|
20
|
-
'less' : 0,
|
|
21
|
-
'small': 1.6rem,
|
|
22
|
-
) !default;
|
|
23
|
-
$columns-gutter-sizes-breakpoints-classes: () !default;
|
|
24
|
-
|
|
25
|
-
$columns-v-gutter-sizes: $columns-gutter-sizes !default;
|
|
26
|
-
$columns-v-gutter-sizes-breakpoints-classes: $columns-gutter-sizes-breakpoints-classes !default;
|
|
27
|
-
|
|
28
11
|
// row
|
|
29
|
-
[#{
|
|
12
|
+
[#{v.$loop-component-prefix}-column~="row"] {
|
|
30
13
|
position: relative;
|
|
31
|
-
left: -#{
|
|
32
|
-
margin-right: -#{
|
|
14
|
+
left: -#{v.$columns-gutter};
|
|
15
|
+
margin-right: -#{v.$columns-gutter};
|
|
33
16
|
|
|
34
17
|
display: flex;
|
|
35
18
|
flex: 0 1 auto;
|
|
@@ -39,9 +22,9 @@ $columns-v-gutter-sizes-breakpoints-classes: $columns-gutter-sizes-breakpoints-c
|
|
|
39
22
|
|
|
40
23
|
|
|
41
24
|
// columns
|
|
42
|
-
[#{
|
|
43
|
-
padding-left:
|
|
44
|
-
padding-bottom:
|
|
25
|
+
[#{v.$loop-component-prefix}-column*="col"] {
|
|
26
|
+
padding-left: v.$columns-gutter;
|
|
27
|
+
padding-bottom: v.$columns-gutter;
|
|
45
28
|
|
|
46
29
|
flex-shrink: 0;
|
|
47
30
|
flex-grow: 1;
|
|
@@ -52,102 +35,102 @@ $columns-v-gutter-sizes-breakpoints-classes: $columns-gutter-sizes-breakpoints-c
|
|
|
52
35
|
}
|
|
53
36
|
|
|
54
37
|
// reponsives classes starting from default value
|
|
55
|
-
@each $class in
|
|
56
|
-
@include breakpoint($class) {
|
|
38
|
+
@each $class in v.$breakpoints-classes-width-default-value {
|
|
39
|
+
@include breakpoint.from($class) {
|
|
57
40
|
$suffix: '';
|
|
58
41
|
@if $class != '' {
|
|
59
42
|
$suffix: \@#{$class};
|
|
60
43
|
}
|
|
61
44
|
|
|
62
45
|
// auto col
|
|
63
|
-
[#{
|
|
46
|
+
[#{v.$loop-component-prefix}-column~="col#{$suffix}"] {
|
|
64
47
|
flex-basis: 0;
|
|
65
48
|
max-width: 100%;
|
|
66
49
|
}
|
|
67
50
|
|
|
68
51
|
// columns
|
|
69
|
-
@for $i from 1 through
|
|
70
|
-
[#{
|
|
71
|
-
flex-basis: percentage(math.div($i,
|
|
72
|
-
max-width: percentage(math.div($i,
|
|
52
|
+
@for $i from 1 through v.$columns-system {
|
|
53
|
+
[#{v.$loop-component-prefix}-column~="col-#{$i}#{$suffix}"] {
|
|
54
|
+
flex-basis: math.percentage(math.div($i, v.$columns-system));
|
|
55
|
+
max-width: math.percentage(math.div($i, v.$columns-system));
|
|
73
56
|
}
|
|
74
57
|
}
|
|
75
58
|
|
|
76
|
-
@if
|
|
59
|
+
@if v.$use-columns-self-adjustment-breakpoints == true or fn.isEmpty($suffix) {
|
|
77
60
|
// adjust to the size of the content
|
|
78
|
-
[#{
|
|
61
|
+
[#{v.$loop-component-prefix}-column~="self-adjust#{$suffix}"] {
|
|
79
62
|
min-width: auto;
|
|
80
63
|
flex-grow: 0;
|
|
81
64
|
flex-basis: auto;
|
|
82
65
|
}
|
|
83
66
|
}
|
|
84
67
|
|
|
85
|
-
@if
|
|
86
|
-
and (
|
|
68
|
+
@if v.$use-columns-alignment == true
|
|
69
|
+
and (v.$use-columns-alignment-breakpoints == true or fn.isEmpty($suffix)) {
|
|
87
70
|
// horizontal alignment
|
|
88
|
-
[#{
|
|
89
|
-
[#{
|
|
90
|
-
[#{
|
|
91
|
-
[#{
|
|
92
|
-
[#{
|
|
71
|
+
[#{v.$loop-component-prefix}-column~="align-left#{$suffix}"] { justify-content: flex-start; }
|
|
72
|
+
[#{v.$loop-component-prefix}-column~="align-center#{$suffix}"] { justify-content: center; }
|
|
73
|
+
[#{v.$loop-component-prefix}-column~="align-right#{$suffix}"] { justify-content: flex-end; }
|
|
74
|
+
[#{v.$loop-component-prefix}-column~="align-evenly#{$suffix}"] { justify-content: space-evenly; }
|
|
75
|
+
[#{v.$loop-component-prefix}-column~="align-between#{$suffix}"]{ justify-content: space-between; }
|
|
93
76
|
|
|
94
77
|
// vertical alignment
|
|
95
|
-
[#{
|
|
96
|
-
[#{
|
|
97
|
-
[#{
|
|
78
|
+
[#{v.$loop-component-prefix}-column~="align-top#{$suffix}"] { align-items: flex-start; }
|
|
79
|
+
[#{v.$loop-component-prefix}-column~="align-middle#{$suffix}"] { align-items: center; }
|
|
80
|
+
[#{v.$loop-component-prefix}-column~="align-bottom#{$suffix}"] { align-items: flex-end; }
|
|
98
81
|
}
|
|
99
82
|
|
|
100
|
-
@if
|
|
101
|
-
and (
|
|
83
|
+
@if v.$use-columns-self-alignment == true
|
|
84
|
+
and (v.$use-columns-self-alignment-breakpoints == true or fn.isEmpty($suffix)) {
|
|
102
85
|
// horizontal alignment
|
|
103
|
-
[#{
|
|
104
|
-
[#{
|
|
105
|
-
[#{
|
|
86
|
+
[#{v.$loop-component-prefix}-column~="self-align-left#{$suffix}"] { margin-left: initial; margin-right: initial; }
|
|
87
|
+
[#{v.$loop-component-prefix}-column~="self-align-center#{$suffix}"] { margin-left: auto; margin-right: auto; }
|
|
88
|
+
[#{v.$loop-component-prefix}-column~="self-align-right#{$suffix}"] { margin-left: auto; margin-right: initial; }
|
|
106
89
|
|
|
107
90
|
// vertical alignment
|
|
108
|
-
[#{
|
|
109
|
-
[#{
|
|
110
|
-
[#{
|
|
91
|
+
[#{v.$loop-component-prefix}-column~="self-align-top#{$suffix}"] { align-self: flex-start; }
|
|
92
|
+
[#{v.$loop-component-prefix}-column~="self-align-middle#{$suffix}"] { align-self: center; }
|
|
93
|
+
[#{v.$loop-component-prefix}-column~="self-align-bottom#{$suffix}"] { align-self: flex-end; }
|
|
111
94
|
}
|
|
112
95
|
}
|
|
113
96
|
}
|
|
114
97
|
|
|
115
98
|
|
|
116
|
-
@if
|
|
117
|
-
[#{
|
|
99
|
+
@if v.$use-columns-child-alignment == true {
|
|
100
|
+
[#{v.$loop-component-prefix}-column*="child-align-"] > * {
|
|
118
101
|
display: flex;
|
|
119
102
|
flex-direction: column;
|
|
120
103
|
}
|
|
121
104
|
|
|
122
105
|
// horizontal alignment
|
|
123
|
-
[#{
|
|
124
|
-
[#{
|
|
125
|
-
[#{
|
|
106
|
+
[#{v.$loop-component-prefix}-column~="child-align-left"] > * { align-items: flex-start; }
|
|
107
|
+
[#{v.$loop-component-prefix}-column~="child-align-center"] > * { align-items: center; }
|
|
108
|
+
[#{v.$loop-component-prefix}-column~="child-align-right"] > * { align-items: flex-end; }
|
|
126
109
|
|
|
127
110
|
// vertical alignment
|
|
128
|
-
[#{
|
|
129
|
-
[#{
|
|
130
|
-
[#{
|
|
111
|
+
[#{v.$loop-component-prefix}-column~="child-align-top"] > * { justify-content: flex-start; }
|
|
112
|
+
[#{v.$loop-component-prefix}-column~="child-align-middle"] > * { justify-content: center; }
|
|
113
|
+
[#{v.$loop-component-prefix}-column~="child-align-bottom"] > * { justify-content: flex-end; }
|
|
131
114
|
}
|
|
132
115
|
|
|
133
116
|
|
|
134
117
|
// responsive classes
|
|
135
|
-
@each $class in
|
|
136
|
-
@include breakpoint($class) {
|
|
118
|
+
@each $class in v.$breakpoints-classes {
|
|
119
|
+
@include breakpoint.from($class) {
|
|
137
120
|
$suffix: \@#{$class};
|
|
138
121
|
|
|
139
122
|
// order-0 to make sure it is first
|
|
140
|
-
@if
|
|
141
|
-
[#{
|
|
123
|
+
@if v.$use-columns-order == true {
|
|
124
|
+
[#{v.$loop-component-prefix}-column~="order-0#{$suffix}"] { order: -1; }
|
|
142
125
|
}
|
|
143
|
-
@for $i from 1 through
|
|
126
|
+
@for $i from 1 through v.$columns-system {
|
|
144
127
|
// offset
|
|
145
|
-
@if
|
|
146
|
-
[#{
|
|
128
|
+
@if v.$use-columns-offset == true {
|
|
129
|
+
[#{v.$loop-component-prefix}-column~="offset-#{$i}#{$suffix}"] { margin-left: math.percentage($i/v.$columns-system); }
|
|
147
130
|
}
|
|
148
131
|
// order
|
|
149
|
-
@if
|
|
150
|
-
[#{
|
|
132
|
+
@if v.$use-columns-order == true {
|
|
133
|
+
[#{v.$loop-component-prefix}-column~="order-#{$i}#{$suffix}"] { order: $i; }
|
|
151
134
|
}
|
|
152
135
|
}
|
|
153
136
|
}
|
|
@@ -155,9 +138,9 @@ $columns-v-gutter-sizes-breakpoints-classes: $columns-gutter-sizes-breakpoints-c
|
|
|
155
138
|
|
|
156
139
|
|
|
157
140
|
// stretch
|
|
158
|
-
[#{
|
|
141
|
+
[#{v.$loop-component-prefix}-column~="stretch"] {
|
|
159
142
|
align-items: stretch;
|
|
160
|
-
> [#{
|
|
143
|
+
> [#{v.$loop-component-prefix}-column*="col"] {
|
|
161
144
|
display: flex;
|
|
162
145
|
> * {
|
|
163
146
|
width:100%;
|
|
@@ -165,18 +148,16 @@ $columns-v-gutter-sizes-breakpoints-classes: $columns-gutter-sizes-breakpoints-c
|
|
|
165
148
|
}
|
|
166
149
|
}
|
|
167
150
|
|
|
168
|
-
|
|
169
151
|
// gutters
|
|
170
|
-
$
|
|
171
|
-
@
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
[#{$loop-component-prefix}-column~="gutter-#{$gutter-name}#{$suffix}"] {
|
|
152
|
+
@each $class in list.join('', v.$columns-gutter-sizes-breakpoints-classes) {
|
|
153
|
+
@include breakpoint.from($class) {
|
|
154
|
+
$suffix: if(fn.isEmpty($class), '', \@#{$class});
|
|
155
|
+
@each $gutter-name, $gutter-size in v.$columns-gutter-sizes {
|
|
156
|
+
[#{v.$loop-component-prefix}-column~="gutter-#{$gutter-name}#{$suffix}"] {
|
|
176
157
|
left: -#{$gutter-size};
|
|
177
158
|
margin-right: -#{$gutter-size};
|
|
178
159
|
|
|
179
|
-
> [#{
|
|
160
|
+
> [#{v.$loop-component-prefix}-column*="col"] {
|
|
180
161
|
padding-bottom: $gutter-size;
|
|
181
162
|
padding-left: $gutter-size;
|
|
182
163
|
}
|
|
@@ -185,13 +166,12 @@ $columns-gutter-sizes-breakpoints-classes: join('', $columns-gutter-sizes-breakp
|
|
|
185
166
|
}
|
|
186
167
|
}
|
|
187
168
|
|
|
188
|
-
$
|
|
189
|
-
@
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
> [#{$loop-component-prefix}-column*="col"] {
|
|
169
|
+
@each $class in list.join('', v.$columns-v-gutter-sizes-breakpoints-classes) {
|
|
170
|
+
@include breakpoint.from($class) {
|
|
171
|
+
$suffix: if(fn.isEmpty($class), '', \@#{$class});
|
|
172
|
+
@each $gutter-name, $gutter-size in v.$columns-v-gutter-sizes {
|
|
173
|
+
[#{v.$loop-component-prefix}-column~="v-gutter-#{$gutter-name}#{$suffix}"] {
|
|
174
|
+
> [#{v.$loop-component-prefix}-column*="col"] {
|
|
195
175
|
padding-bottom: $gutter-size;
|
|
196
176
|
}
|
|
197
177
|
}
|
|
@@ -200,7 +180,7 @@ $columns-v-gutter-sizes-breakpoints-classes: join('', $columns-v-gutter-sizes-br
|
|
|
200
180
|
}
|
|
201
181
|
|
|
202
182
|
// clear
|
|
203
|
-
[#{
|
|
183
|
+
[#{v.$loop-component-prefix}-column~="clear"] {
|
|
204
184
|
flex-basis: 100%;
|
|
205
185
|
max-width: 100%;
|
|
206
186
|
}
|