@madj2k/fe-frontend-kit 2.0.28 → 2.0.30
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/package.json
CHANGED
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
///
|
|
24
24
|
/// @group Layout
|
|
25
25
|
///
|
|
26
|
+
/// @param {Map} $page-padding - A map of breakpoint names to padding values for responsive control. Defaults to predefined breakpoint-based paddings.
|
|
26
27
|
/// @param {String} $page-wrap-class - The base class used to wrap the entire page (for context-aware styling). Defaults to `'.page'`.
|
|
27
28
|
/// @param {String} $wrap-class - The base utility class prefix for full-width behavior. Defaults to `'.fullwidth'`.
|
|
28
29
|
/// @param {Length} $default-padding - The default horizontal padding applied when full-width is active. Defaults to `16px`.
|
|
30
|
+
/// @param {String} $padding-class - The class prefix used for standalone padding utilities. Defaults to `$page-wrap-class`.
|
|
31
|
+
/// @param {Number} $version - Version number for compatibility handling. Defaults to `1`.
|
|
29
32
|
///
|
|
30
33
|
/// @example html
|
|
31
34
|
/// <!-- 1) Around a Bootstrap container -->
|
|
@@ -85,15 +88,39 @@
|
|
|
85
88
|
),
|
|
86
89
|
$page-wrap-class: '.page',
|
|
87
90
|
$wrap-class: '.fullwidth',
|
|
88
|
-
$default-padding: 16px
|
|
91
|
+
$default-padding: 16px,
|
|
92
|
+
$padding-class: $page-wrap-class,
|
|
93
|
+
$version: 1,
|
|
89
94
|
) {
|
|
90
95
|
|
|
96
|
+
/** addition class which simply contains the normal padding */
|
|
97
|
+
#{$padding-class}-padding {
|
|
98
|
+
@include page-padding-only($default-padding, 'full');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** default settings without breakpoint in class-name, but with different paddings/margins depending on breakpoint */
|
|
102
|
+
@each $breakpoint, $padding-x in $page-padding {
|
|
103
|
+
@include media-breakpoint-up($breakpoint) {
|
|
104
|
+
/** addition class which simply contains the normal padding */
|
|
105
|
+
#{$padding-class}-padding {
|
|
106
|
+
@include page-padding-only($padding-x, 'full');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
body {
|
|
110
|
+
/** addition class which simply contains the normal padding */
|
|
111
|
+
#{$padding-class}-#{$breakpoint}-padding {
|
|
112
|
+
@include page-padding-only($padding-x, 'full');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
91
118
|
#{$page-wrap-class} {
|
|
92
119
|
|
|
93
120
|
/** default settings without breakpoints **/
|
|
94
121
|
@include page-padding-only($default-padding);
|
|
95
122
|
|
|
96
|
-
|
|
123
|
+
/** for usage as wrap around a container */
|
|
97
124
|
#{$wrap-class}-1 {
|
|
98
125
|
@include page-padding-container($default-padding);
|
|
99
126
|
|
|
@@ -128,11 +155,13 @@
|
|
|
128
155
|
@include page-padding-only-reset();
|
|
129
156
|
}
|
|
130
157
|
}
|
|
158
|
+
}
|
|
131
159
|
|
|
132
|
-
|
|
133
|
-
|
|
160
|
+
/** default settings without breakpoint in class-name, but with different paddings/margins depending on breakpoint */
|
|
161
|
+
@each $breakpoint, $padding-x in $page-padding {
|
|
162
|
+
@include media-breakpoint-up($breakpoint) {
|
|
134
163
|
|
|
135
|
-
|
|
164
|
+
#{$page-wrap-class} {
|
|
136
165
|
|
|
137
166
|
/** for usage as wrap around a container */
|
|
138
167
|
#{$wrap-class}-1 {
|
|
@@ -155,12 +184,12 @@
|
|
|
155
184
|
|
|
156
185
|
/** reset */
|
|
157
186
|
#{$wrap-class}-0,
|
|
158
|
-
|
|
187
|
+
.row #{$wrap-class}-0 {
|
|
159
188
|
@include page-padding-row-reset();
|
|
160
|
-
|
|
189
|
+
}
|
|
161
190
|
|
|
162
191
|
#{$wrap-class}-0 {
|
|
163
|
-
#{$wrap-class}-inner{
|
|
192
|
+
#{$wrap-class}-inner {
|
|
164
193
|
@include page-padding-inner-reset();
|
|
165
194
|
}
|
|
166
195
|
|
|
@@ -170,17 +199,23 @@
|
|
|
170
199
|
}
|
|
171
200
|
}
|
|
172
201
|
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
202
|
|
|
176
|
-
/** specific settings for classes with breakpoints in names. Has to be dominant */
|
|
177
|
-
@each $breakpoint, $padding-x in $page-padding {
|
|
178
|
-
@include media-breakpoint-up($breakpoint) {
|
|
179
203
|
|
|
204
|
+
/** ==================================================================================== */
|
|
205
|
+
/** specific settings for classes with breakpoints in names. Has to be dominant */
|
|
180
206
|
/** ensure dominance with body-prefix */
|
|
181
207
|
body #{$page-wrap-class} {
|
|
182
|
-
|
|
183
|
-
|
|
208
|
+
|
|
209
|
+
// seems to be a bug in older version. But we keep it for compatibility
|
|
210
|
+
@if ($version < 2) {
|
|
211
|
+
padding-left: $padding-x - math.div($grid-gutter-width, 2);
|
|
212
|
+
padding-right: $padding-x - math.div($grid-gutter-width, 2);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** addition class which simply contains the normal padding */
|
|
216
|
+
#{$padding-class}-#{$breakpoint}-padding {
|
|
217
|
+
@include page-padding-only($padding-x, 'full');
|
|
218
|
+
}
|
|
184
219
|
|
|
185
220
|
/** for usage as wrap around a container */
|
|
186
221
|
#{$wrap-class}-#{$breakpoint}-1 {
|
|
@@ -212,9 +247,14 @@
|
|
|
212
247
|
}
|
|
213
248
|
}
|
|
214
249
|
|
|
215
|
-
@mixin page-padding-only ($padding-x) {
|
|
216
|
-
|
|
217
|
-
|
|
250
|
+
@mixin page-padding-only ($padding-x, $variant: 'default') {
|
|
251
|
+
@if ($variant == 'full') {
|
|
252
|
+
padding-left: $padding-x;
|
|
253
|
+
padding-right: $padding-x;
|
|
254
|
+
} @else {
|
|
255
|
+
padding-left: $padding-x - math.div($grid-gutter-width, 2);
|
|
256
|
+
padding-right: $padding-x - math.div($grid-gutter-width, 2);
|
|
257
|
+
}
|
|
218
258
|
}
|
|
219
259
|
|
|
220
260
|
@mixin page-padding-container ($padding-x) {
|
|
@@ -230,7 +270,6 @@
|
|
|
230
270
|
margin-left: $padding-x * -1 + math.div($grid-gutter-width, 2);
|
|
231
271
|
margin-right: $padding-x * -1 + math.div($grid-gutter-width, 2);
|
|
232
272
|
overflow: hidden;
|
|
233
|
-
|
|
234
273
|
/*
|
|
235
274
|
$additionalWidth: $padding-x * 2;
|
|
236
275
|
width: calc(100% + $additionalWidth);
|