uikit 3.14.4-dev.871ba3c05 → 3.14.4-dev.ce706e326
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/CHANGELOG.md +9 -0
- package/dist/css/uikit-core-rtl.css +33 -15
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +33 -15
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +30 -15
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +30 -15
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +89 -5
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +89 -5
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +665 -617
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +665 -617
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/drop.js +7 -0
- package/src/js/core/height-viewport.js +9 -5
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/mixin/modal.js +90 -4
- package/src/js/util/dimensions.js +6 -6
- package/src/less/components/nav.less +22 -4
- package/src/less/components/navbar.less +8 -11
- package/src/less/components/utility.less +12 -3
- package/src/less/theme/nav.less +3 -7
- package/src/less/theme/navbar.less +3 -1
- package/src/scss/components/nav.scss +22 -4
- package/src/scss/components/navbar.scss +8 -11
- package/src/scss/components/utility.scss +12 -3
- package/src/scss/mixins-theme.scss +1 -1
- package/src/scss/theme/nav.scss +3 -7
- package/src/scss/theme/navbar.scss +3 -1
- package/src/scss/variables-theme.scss +10 -4
- package/src/scss/variables.scss +10 -3
- package/tests/drop.html +6 -0
- package/tests/navbar.html +2041 -1267
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "uikit",
|
|
3
3
|
"title": "UIkit",
|
|
4
4
|
"description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
|
|
5
|
-
"version": "3.14.4-dev.
|
|
5
|
+
"version": "3.14.4-dev.ce706e326",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/drop.js
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
toggleClass,
|
|
31
31
|
within,
|
|
32
32
|
} from 'uikit-util';
|
|
33
|
+
import { preventBackgroundScroll, preventOverscroll } from '../mixin/modal';
|
|
33
34
|
|
|
34
35
|
export let active;
|
|
35
36
|
|
|
@@ -48,6 +49,7 @@ export default {
|
|
|
48
49
|
display: String,
|
|
49
50
|
clsDrop: String,
|
|
50
51
|
animateOut: Boolean,
|
|
52
|
+
bgScroll: Boolean,
|
|
51
53
|
},
|
|
52
54
|
|
|
53
55
|
data: {
|
|
@@ -63,6 +65,7 @@ export default {
|
|
|
63
65
|
cls: 'uk-open',
|
|
64
66
|
container: false,
|
|
65
67
|
animateOut: false,
|
|
68
|
+
bgScroll: true,
|
|
66
69
|
},
|
|
67
70
|
|
|
68
71
|
created() {
|
|
@@ -250,6 +253,10 @@ export default {
|
|
|
250
253
|
}
|
|
251
254
|
}),
|
|
252
255
|
|
|
256
|
+
...(this.bgScroll
|
|
257
|
+
? []
|
|
258
|
+
: [preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
259
|
+
|
|
253
260
|
...(this.display === 'static' && this.align !== 'stretch'
|
|
254
261
|
? []
|
|
255
262
|
: (() => {
|
|
@@ -56,14 +56,18 @@ export default {
|
|
|
56
56
|
0
|
|
57
57
|
);
|
|
58
58
|
} else {
|
|
59
|
+
const isScrollingElement = document.scrollingElement === scrollElement;
|
|
60
|
+
|
|
59
61
|
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
60
|
-
minHeight = `calc(${
|
|
61
|
-
document.scrollingElement === scrollElement ? '100vh' : `${viewportHeight}px`
|
|
62
|
-
}`;
|
|
62
|
+
minHeight = `calc(${isScrollingElement ? '100vh' : `${viewportHeight}px`}`;
|
|
63
63
|
|
|
64
64
|
if (this.offsetTop) {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
if (isScrollingElement) {
|
|
66
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
67
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : '';
|
|
68
|
+
} else {
|
|
69
|
+
minHeight += ` - ${css(scrollElement, 'paddingTop')}`;
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
if (this.offsetBottom === true) {
|
package/src/js/core/offcanvas.js
CHANGED
|
@@ -93,22 +93,6 @@ export default {
|
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
95
|
|
|
96
|
-
{
|
|
97
|
-
name: 'touchstart',
|
|
98
|
-
|
|
99
|
-
passive: true,
|
|
100
|
-
|
|
101
|
-
el() {
|
|
102
|
-
return this.panel;
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
handler({ targetTouches }) {
|
|
106
|
-
if (targetTouches.length === 1) {
|
|
107
|
-
this.clientY = targetTouches[0].clientY;
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
|
|
112
96
|
{
|
|
113
97
|
name: 'touchmove',
|
|
114
98
|
|
|
@@ -124,33 +108,6 @@ export default {
|
|
|
124
108
|
},
|
|
125
109
|
},
|
|
126
110
|
|
|
127
|
-
{
|
|
128
|
-
name: 'touchmove',
|
|
129
|
-
|
|
130
|
-
passive: false,
|
|
131
|
-
|
|
132
|
-
el() {
|
|
133
|
-
return this.panel;
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
handler(e) {
|
|
137
|
-
if (e.targetTouches.length !== 1) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const clientY = e.targetTouches[0].clientY - this.clientY;
|
|
142
|
-
const { scrollTop, scrollHeight, clientHeight } = this.panel;
|
|
143
|
-
|
|
144
|
-
if (
|
|
145
|
-
clientHeight >= scrollHeight ||
|
|
146
|
-
(scrollTop === 0 && clientY > 0) ||
|
|
147
|
-
(scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
148
|
-
) {
|
|
149
|
-
e.cancelable && e.preventDefault();
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
|
|
154
111
|
{
|
|
155
112
|
name: 'show',
|
|
156
113
|
|
|
@@ -162,7 +119,6 @@ export default {
|
|
|
162
119
|
addClass(parent(this.panel), this.clsMode);
|
|
163
120
|
}
|
|
164
121
|
|
|
165
|
-
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
|
|
166
122
|
addClass(document.body, this.clsContainer, this.clsFlip);
|
|
167
123
|
css(document.body, 'touch-action', 'pan-y pinch-zoom');
|
|
168
124
|
css(this.$el, 'display', 'block');
|
|
@@ -170,7 +126,7 @@ export default {
|
|
|
170
126
|
addClass(
|
|
171
127
|
this.panel,
|
|
172
128
|
this.clsSidebarAnimation,
|
|
173
|
-
this.mode
|
|
129
|
+
this.mode === 'reveal' ? '' : this.clsMode
|
|
174
130
|
);
|
|
175
131
|
|
|
176
132
|
height(document.body); // force reflow
|
|
@@ -207,8 +163,6 @@ export default {
|
|
|
207
163
|
removeClass(this.$el, this.clsOverlay);
|
|
208
164
|
css(this.$el, 'display', '');
|
|
209
165
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
210
|
-
|
|
211
|
-
css(document.documentElement, 'overflowY', '');
|
|
212
166
|
},
|
|
213
167
|
},
|
|
214
168
|
|
package/src/js/mixin/modal.js
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
$,
|
|
3
3
|
addClass,
|
|
4
4
|
append,
|
|
5
|
+
apply,
|
|
5
6
|
attr,
|
|
6
7
|
css,
|
|
7
8
|
endsWith,
|
|
@@ -15,6 +16,7 @@ import {
|
|
|
15
16
|
pointerDown,
|
|
16
17
|
pointerUp,
|
|
17
18
|
removeClass,
|
|
19
|
+
scrollParents,
|
|
18
20
|
toFloat,
|
|
19
21
|
width,
|
|
20
22
|
within,
|
|
@@ -121,17 +123,26 @@ export default {
|
|
|
121
123
|
self: true,
|
|
122
124
|
|
|
123
125
|
handler() {
|
|
124
|
-
|
|
126
|
+
once(
|
|
127
|
+
this.$el,
|
|
128
|
+
'hide',
|
|
129
|
+
on(document, 'focusin', (e) => {
|
|
130
|
+
if (last(active) === this && !within(e.target, this.$el)) {
|
|
131
|
+
this.$el.focus();
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
);
|
|
125
135
|
|
|
126
|
-
if (
|
|
127
|
-
|
|
136
|
+
if (this.overlay) {
|
|
137
|
+
once(this.$el, 'hide', preventOverscroll(this.$el));
|
|
138
|
+
once(this.$el, 'hide', preventBackgroundScroll());
|
|
128
139
|
}
|
|
129
140
|
|
|
130
141
|
if (this.stack) {
|
|
131
142
|
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active.length);
|
|
132
143
|
}
|
|
133
144
|
|
|
134
|
-
addClass(
|
|
145
|
+
addClass(document.documentElement, this.clsPage);
|
|
135
146
|
|
|
136
147
|
if (this.bgClose) {
|
|
137
148
|
once(
|
|
@@ -273,3 +284,78 @@ function animate({ transitionElement, _toggle }) {
|
|
|
273
284
|
function toMs(time) {
|
|
274
285
|
return time ? (endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000) : 0;
|
|
275
286
|
}
|
|
287
|
+
|
|
288
|
+
export function preventOverscroll(el) {
|
|
289
|
+
if (CSS.supports('overscroll-behavior', 'contain')) {
|
|
290
|
+
const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
|
|
291
|
+
css(elements, 'overscrollBehavior', 'contain');
|
|
292
|
+
return () => css(elements, 'overscrollBehavior', '');
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
let startClientY;
|
|
296
|
+
|
|
297
|
+
const events = [
|
|
298
|
+
on(
|
|
299
|
+
el,
|
|
300
|
+
'touchstart',
|
|
301
|
+
({ targetTouches }) => {
|
|
302
|
+
if (targetTouches.length === 1) {
|
|
303
|
+
startClientY = targetTouches[0].clientY;
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
{ passive: true }
|
|
307
|
+
),
|
|
308
|
+
|
|
309
|
+
on(
|
|
310
|
+
el,
|
|
311
|
+
'touchmove',
|
|
312
|
+
(e) => {
|
|
313
|
+
if (e.targetTouches.length !== 1) {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
let [scrollParent] = scrollParents(e.target, /auto|scroll/);
|
|
318
|
+
if (!within(scrollParent, el)) {
|
|
319
|
+
scrollParent = el;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
323
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
324
|
+
|
|
325
|
+
if (
|
|
326
|
+
clientHeight >= scrollHeight ||
|
|
327
|
+
(scrollTop === 0 && clientY > 0) ||
|
|
328
|
+
(scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
329
|
+
) {
|
|
330
|
+
e.cancelable && e.preventDefault();
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{ passive: false }
|
|
334
|
+
),
|
|
335
|
+
];
|
|
336
|
+
|
|
337
|
+
return () => events.forEach((fn) => fn());
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export function preventBackgroundScroll() {
|
|
341
|
+
const { body, documentElement } = document;
|
|
342
|
+
css(body, {
|
|
343
|
+
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
344
|
+
touchAction: 'none',
|
|
345
|
+
});
|
|
346
|
+
css(documentElement, 'overflowY', 'hidden');
|
|
347
|
+
return () => {
|
|
348
|
+
css(documentElement, 'overflowY', '');
|
|
349
|
+
css(body, { overflowY: '', touchAction: '' });
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function filterChildren(el, fn) {
|
|
354
|
+
const children = [];
|
|
355
|
+
apply(el, (node) => {
|
|
356
|
+
if (fn(node)) {
|
|
357
|
+
children.push(node);
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
return children;
|
|
361
|
+
}
|
|
@@ -94,13 +94,13 @@ export function position(element) {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export function offsetPosition(element) {
|
|
97
|
-
const offset = [0, 0];
|
|
98
|
-
|
|
99
97
|
element = toNode(element);
|
|
100
98
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
const offset = [element.offsetTop, element.offsetLeft];
|
|
100
|
+
|
|
101
|
+
while ((element = element.offsetParent)) {
|
|
102
|
+
offset[0] += element.offsetTop + toFloat(css(element, `borderTopWidth`));
|
|
103
|
+
offset[1] += element.offsetLeft + toFloat(css(element, `borderLeftWidth`));
|
|
104
104
|
|
|
105
105
|
if (css(element, 'position') === 'fixed') {
|
|
106
106
|
const win = toWindow(element);
|
|
@@ -108,7 +108,7 @@ export function offsetPosition(element) {
|
|
|
108
108
|
offset[1] += win.scrollX;
|
|
109
109
|
return offset;
|
|
110
110
|
}
|
|
111
|
-
}
|
|
111
|
+
}
|
|
112
112
|
|
|
113
113
|
return offset;
|
|
114
114
|
}
|
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
@nav-divider-margin-vertical: 5px;
|
|
47
47
|
@nav-divider-margin-horizontal: 0;
|
|
48
48
|
|
|
49
|
+
@nav-default-font-size: @global-font-size;
|
|
50
|
+
@nav-default-line-height: @global-line-height;
|
|
49
51
|
@nav-default-item-color: @global-muted-color;
|
|
50
52
|
@nav-default-item-hover-color: @global-color;
|
|
51
53
|
@nav-default-item-active-color: @global-emphasis-color;
|
|
@@ -53,12 +55,14 @@
|
|
|
53
55
|
@nav-default-header-color: @global-emphasis-color;
|
|
54
56
|
@nav-default-divider-border-width: @global-border-width;
|
|
55
57
|
@nav-default-divider-border: @global-border;
|
|
58
|
+
@nav-default-sublist-font-size: @nav-default-font-size;
|
|
59
|
+
@nav-default-sublist-line-height: @nav-default-line-height;
|
|
56
60
|
@nav-default-sublist-item-color: @global-muted-color;
|
|
57
61
|
@nav-default-sublist-item-hover-color: @global-color;
|
|
58
62
|
@nav-default-sublist-item-active-color: @global-emphasis-color;
|
|
59
63
|
|
|
60
|
-
@nav-primary-
|
|
61
|
-
@nav-primary-
|
|
64
|
+
@nav-primary-font-size: @global-large-font-size;
|
|
65
|
+
@nav-primary-line-height: @global-line-height;
|
|
62
66
|
@nav-primary-item-color: @global-muted-color;
|
|
63
67
|
@nav-primary-item-hover-color: @global-color;
|
|
64
68
|
@nav-primary-item-active-color: @global-emphasis-color;
|
|
@@ -66,6 +70,8 @@
|
|
|
66
70
|
@nav-primary-header-color: @global-emphasis-color;
|
|
67
71
|
@nav-primary-divider-border-width: @global-border-width;
|
|
68
72
|
@nav-primary-divider-border: @global-border;
|
|
73
|
+
@nav-primary-sublist-font-size: @global-medium-font-size;
|
|
74
|
+
@nav-primary-sublist-line-height: @global-line-height;
|
|
69
75
|
@nav-primary-sublist-item-color: @global-muted-color;
|
|
70
76
|
@nav-primary-sublist-item-hover-color: @global-color;
|
|
71
77
|
@nav-primary-sublist-item-active-color: @global-emphasis-color;
|
|
@@ -186,6 +192,8 @@ ul.uk-nav-sub {
|
|
|
186
192
|
========================================================================== */
|
|
187
193
|
|
|
188
194
|
.uk-nav-default {
|
|
195
|
+
font-size: @nav-default-font-size;
|
|
196
|
+
line-height: @nav-default-line-height;
|
|
189
197
|
.hook-nav-default();
|
|
190
198
|
}
|
|
191
199
|
|
|
@@ -241,6 +249,11 @@ ul.uk-nav-sub {
|
|
|
241
249
|
* Sublists
|
|
242
250
|
*/
|
|
243
251
|
|
|
252
|
+
.uk-nav-default .uk-nav-sub {
|
|
253
|
+
font-size: @nav-default-sublist-font-size;
|
|
254
|
+
line-height: @nav-default-sublist-line-height;
|
|
255
|
+
}
|
|
256
|
+
|
|
244
257
|
.uk-nav-default .uk-nav-sub a { color: @nav-default-sublist-item-color; }
|
|
245
258
|
|
|
246
259
|
.uk-nav-default .uk-nav-sub a:hover { color: @nav-default-sublist-item-hover-color; }
|
|
@@ -252,6 +265,8 @@ ul.uk-nav-sub {
|
|
|
252
265
|
========================================================================== */
|
|
253
266
|
|
|
254
267
|
.uk-nav-primary {
|
|
268
|
+
font-size: @nav-primary-font-size;
|
|
269
|
+
line-height: @nav-primary-line-height;
|
|
255
270
|
.hook-nav-primary();
|
|
256
271
|
}
|
|
257
272
|
|
|
@@ -260,8 +275,6 @@ ul.uk-nav-sub {
|
|
|
260
275
|
*/
|
|
261
276
|
|
|
262
277
|
.uk-nav-primary > li > a {
|
|
263
|
-
font-size: @nav-primary-item-font-size;
|
|
264
|
-
line-height: @nav-primary-item-line-height;
|
|
265
278
|
color: @nav-primary-item-color;
|
|
266
279
|
.hook-nav-primary-item();
|
|
267
280
|
}
|
|
@@ -309,6 +322,11 @@ ul.uk-nav-sub {
|
|
|
309
322
|
* Sublists
|
|
310
323
|
*/
|
|
311
324
|
|
|
325
|
+
.uk-nav-primary .uk-nav-sub {
|
|
326
|
+
font-size: @nav-primary-sublist-font-size;
|
|
327
|
+
line-height: @nav-primary-sublist-line-height;
|
|
328
|
+
}
|
|
329
|
+
|
|
312
330
|
.uk-nav-primary .uk-nav-sub a { color: @nav-primary-sublist-item-color; }
|
|
313
331
|
|
|
314
332
|
.uk-nav-primary .uk-nav-sub a:hover { color: @nav-primary-sublist-item-hover-color; }
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
// ========================================================================
|
|
38
38
|
|
|
39
39
|
@navbar-background: @global-muted-background;
|
|
40
|
+
@navbar-gap: 0px; // Must have a unit because of `calc`
|
|
40
41
|
@navbar-color-mode: none;
|
|
41
42
|
|
|
43
|
+
@navbar-nav-gap: 0px; // Must have a unit because of `calc`
|
|
44
|
+
|
|
42
45
|
@navbar-nav-item-height: 80px;
|
|
43
|
-
@navbar-nav-item-gap: 0px; // Must have a unit because of `calc`
|
|
44
46
|
@navbar-nav-item-padding-horizontal: 15px;
|
|
45
47
|
@navbar-nav-item-color: @global-muted-color;
|
|
46
48
|
@navbar-nav-item-font-size: @global-font-size;
|
|
@@ -98,7 +100,6 @@
|
|
|
98
100
|
|
|
99
101
|
.uk-navbar {
|
|
100
102
|
display: flex;
|
|
101
|
-
--uk-navbar-nav-item-gap: @navbar-nav-item-gap;
|
|
102
103
|
/* 1 */
|
|
103
104
|
position: relative;
|
|
104
105
|
.hook-navbar();
|
|
@@ -123,17 +124,13 @@
|
|
|
123
124
|
|
|
124
125
|
/*
|
|
125
126
|
* 1. Align navs and items vertically if they have a different height
|
|
126
|
-
* 2. Note: IE 11 requires an extra `div` which affects the center selector
|
|
127
127
|
*/
|
|
128
128
|
|
|
129
129
|
.uk-navbar-left,
|
|
130
130
|
.uk-navbar-right,
|
|
131
|
-
|
|
132
|
-
.uk-navbar-center,
|
|
133
|
-
.uk-navbar-center-left > *,
|
|
134
|
-
.uk-navbar-center-right > * {
|
|
131
|
+
[class*='uk-navbar-center'] {
|
|
135
132
|
display: flex;
|
|
136
|
-
gap:
|
|
133
|
+
gap: @navbar-gap;
|
|
137
134
|
/* 1 */
|
|
138
135
|
align-items: center;
|
|
139
136
|
}
|
|
@@ -175,8 +172,8 @@
|
|
|
175
172
|
top: 0;
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
.uk-navbar-center-left { right: ~'calc(100% +
|
|
179
|
-
.uk-navbar-center-right { left: ~'calc(100% +
|
|
175
|
+
.uk-navbar-center-left { right: ~'calc(100% + @{navbar-gap})'; }
|
|
176
|
+
.uk-navbar-center-right { left: ~'calc(100% + @{navbar-gap})'; }
|
|
180
177
|
|
|
181
178
|
[class*='uk-navbar-center-'] {
|
|
182
179
|
width: max-content;
|
|
@@ -193,7 +190,7 @@
|
|
|
193
190
|
|
|
194
191
|
.uk-navbar-nav {
|
|
195
192
|
display: flex;
|
|
196
|
-
gap:
|
|
193
|
+
gap: @navbar-nav-gap;
|
|
197
194
|
/* 1 */
|
|
198
195
|
margin: 0;
|
|
199
196
|
padding: 0;
|
|
@@ -384,18 +384,27 @@
|
|
|
384
384
|
========================================================================== */
|
|
385
385
|
|
|
386
386
|
/*
|
|
387
|
-
* 1.
|
|
387
|
+
* 1. Style
|
|
388
|
+
* 2. Required for `a`
|
|
389
|
+
* 3. Behave like image but can be overridden through flex utility classes
|
|
388
390
|
*/
|
|
389
391
|
|
|
390
392
|
.uk-logo {
|
|
393
|
+
/* 1 */
|
|
391
394
|
font-size: @logo-font-size;
|
|
392
395
|
font-family: @logo-font-family;
|
|
393
396
|
color: @logo-color;
|
|
394
|
-
/*
|
|
397
|
+
/* 2 */
|
|
395
398
|
text-decoration: none;
|
|
396
399
|
.hook-logo();
|
|
397
400
|
}
|
|
398
401
|
|
|
402
|
+
/* 3 */
|
|
403
|
+
:where(.uk-logo) {
|
|
404
|
+
display: inline-block;
|
|
405
|
+
vertical-align: middle;
|
|
406
|
+
}
|
|
407
|
+
|
|
399
408
|
/* Hover */
|
|
400
409
|
.uk-logo:hover {
|
|
401
410
|
color: @logo-hover-color;
|
|
@@ -404,7 +413,7 @@
|
|
|
404
413
|
.hook-logo-hover();
|
|
405
414
|
}
|
|
406
415
|
|
|
407
|
-
.uk-logo > :where(img, svg, video) { display:
|
|
416
|
+
.uk-logo > :where(img, svg, video) { display: block; }
|
|
408
417
|
|
|
409
418
|
.uk-logo-inverse { display: none; }
|
|
410
419
|
|
package/src/less/theme/nav.less
CHANGED
|
@@ -7,14 +7,10 @@
|
|
|
7
7
|
// Variables
|
|
8
8
|
// ========================================================================
|
|
9
9
|
|
|
10
|
-
@nav-default-subtitle-font-size: 12px;
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
// New
|
|
14
|
-
//
|
|
15
|
-
|
|
16
10
|
@nav-default-font-size: @global-small-font-size;
|
|
17
11
|
|
|
12
|
+
@nav-default-subtitle-font-size: 12px;
|
|
13
|
+
|
|
18
14
|
|
|
19
15
|
// Sublists
|
|
20
16
|
// ========================================================================
|
|
@@ -43,7 +39,7 @@
|
|
|
43
39
|
// Default style modifier
|
|
44
40
|
// ========================================================================
|
|
45
41
|
|
|
46
|
-
.hook-nav-default() {
|
|
42
|
+
.hook-nav-default() {}
|
|
47
43
|
|
|
48
44
|
.hook-nav-default-item() {}
|
|
49
45
|
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
// Variables
|
|
8
8
|
// ========================================================================
|
|
9
9
|
|
|
10
|
-
@navbar-
|
|
10
|
+
@navbar-gap: 30px;
|
|
11
|
+
|
|
12
|
+
@navbar-nav-gap: 30px;
|
|
11
13
|
@navbar-nav-item-padding-horizontal: 0;
|
|
12
14
|
|
|
13
15
|
@navbar-nav-item-font-size: @global-small-font-size;
|
|
@@ -46,6 +46,8 @@ $nav-header-margin-top: $global-margin !default;
|
|
|
46
46
|
$nav-divider-margin-vertical: 5px !default;
|
|
47
47
|
$nav-divider-margin-horizontal: 0 !default;
|
|
48
48
|
|
|
49
|
+
$nav-default-font-size: $global-font-size !default;
|
|
50
|
+
$nav-default-line-height: $global-line-height !default;
|
|
49
51
|
$nav-default-item-color: $global-muted-color !default;
|
|
50
52
|
$nav-default-item-hover-color: $global-color !default;
|
|
51
53
|
$nav-default-item-active-color: $global-emphasis-color !default;
|
|
@@ -53,12 +55,14 @@ $nav-default-subtitle-font-size: $global-small-font-size !defaul
|
|
|
53
55
|
$nav-default-header-color: $global-emphasis-color !default;
|
|
54
56
|
$nav-default-divider-border-width: $global-border-width !default;
|
|
55
57
|
$nav-default-divider-border: $global-border !default;
|
|
58
|
+
$nav-default-sublist-font-size: $nav-default-font-size !default;
|
|
59
|
+
$nav-default-sublist-line-height: $nav-default-line-height !default;
|
|
56
60
|
$nav-default-sublist-item-color: $global-muted-color !default;
|
|
57
61
|
$nav-default-sublist-item-hover-color: $global-color !default;
|
|
58
62
|
$nav-default-sublist-item-active-color: $global-emphasis-color !default;
|
|
59
63
|
|
|
60
|
-
$nav-primary-
|
|
61
|
-
$nav-primary-
|
|
64
|
+
$nav-primary-font-size: $global-large-font-size !default;
|
|
65
|
+
$nav-primary-line-height: $global-line-height !default;
|
|
62
66
|
$nav-primary-item-color: $global-muted-color !default;
|
|
63
67
|
$nav-primary-item-hover-color: $global-color !default;
|
|
64
68
|
$nav-primary-item-active-color: $global-emphasis-color !default;
|
|
@@ -66,6 +70,8 @@ $nav-primary-subtitle-font-size: $global-medium-font-size !defau
|
|
|
66
70
|
$nav-primary-header-color: $global-emphasis-color !default;
|
|
67
71
|
$nav-primary-divider-border-width: $global-border-width !default;
|
|
68
72
|
$nav-primary-divider-border: $global-border !default;
|
|
73
|
+
$nav-primary-sublist-font-size: $global-medium-font-size !default;
|
|
74
|
+
$nav-primary-sublist-line-height: $global-line-height !default;
|
|
69
75
|
$nav-primary-sublist-item-color: $global-muted-color !default;
|
|
70
76
|
$nav-primary-sublist-item-hover-color: $global-color !default;
|
|
71
77
|
$nav-primary-sublist-item-active-color: $global-emphasis-color !default;
|
|
@@ -186,6 +192,8 @@ ul.uk-nav-sub {
|
|
|
186
192
|
========================================================================== */
|
|
187
193
|
|
|
188
194
|
.uk-nav-default {
|
|
195
|
+
font-size: $nav-default-font-size;
|
|
196
|
+
line-height: $nav-default-line-height;
|
|
189
197
|
@if(mixin-exists(hook-nav-default)) {@include hook-nav-default();}
|
|
190
198
|
}
|
|
191
199
|
|
|
@@ -241,6 +249,11 @@ ul.uk-nav-sub {
|
|
|
241
249
|
* Sublists
|
|
242
250
|
*/
|
|
243
251
|
|
|
252
|
+
.uk-nav-default .uk-nav-sub {
|
|
253
|
+
font-size: $nav-default-sublist-font-size;
|
|
254
|
+
line-height: $nav-default-sublist-line-height;
|
|
255
|
+
}
|
|
256
|
+
|
|
244
257
|
.uk-nav-default .uk-nav-sub a { color: $nav-default-sublist-item-color; }
|
|
245
258
|
|
|
246
259
|
.uk-nav-default .uk-nav-sub a:hover { color: $nav-default-sublist-item-hover-color; }
|
|
@@ -252,6 +265,8 @@ ul.uk-nav-sub {
|
|
|
252
265
|
========================================================================== */
|
|
253
266
|
|
|
254
267
|
.uk-nav-primary {
|
|
268
|
+
font-size: $nav-primary-font-size;
|
|
269
|
+
line-height: $nav-primary-line-height;
|
|
255
270
|
@if(mixin-exists(hook-nav-primary)) {@include hook-nav-primary();}
|
|
256
271
|
}
|
|
257
272
|
|
|
@@ -260,8 +275,6 @@ ul.uk-nav-sub {
|
|
|
260
275
|
*/
|
|
261
276
|
|
|
262
277
|
.uk-nav-primary > li > a {
|
|
263
|
-
font-size: $nav-primary-item-font-size;
|
|
264
|
-
line-height: $nav-primary-item-line-height;
|
|
265
278
|
color: $nav-primary-item-color;
|
|
266
279
|
@if(mixin-exists(hook-nav-primary-item)) {@include hook-nav-primary-item();}
|
|
267
280
|
}
|
|
@@ -309,6 +322,11 @@ ul.uk-nav-sub {
|
|
|
309
322
|
* Sublists
|
|
310
323
|
*/
|
|
311
324
|
|
|
325
|
+
.uk-nav-primary .uk-nav-sub {
|
|
326
|
+
font-size: $nav-primary-sublist-font-size;
|
|
327
|
+
line-height: $nav-primary-sublist-line-height;
|
|
328
|
+
}
|
|
329
|
+
|
|
312
330
|
.uk-nav-primary .uk-nav-sub a { color: $nav-primary-sublist-item-color; }
|
|
313
331
|
|
|
314
332
|
.uk-nav-primary .uk-nav-sub a:hover { color: $nav-primary-sublist-item-hover-color; }
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
// ========================================================================
|
|
38
38
|
|
|
39
39
|
$navbar-background: $global-muted-background !default;
|
|
40
|
+
$navbar-gap: 0px !default; // Must have a unit because of `calc`
|
|
40
41
|
$navbar-color-mode: none !default;
|
|
41
42
|
|
|
43
|
+
$navbar-nav-gap: 0px !default; // Must have a unit because of `calc`
|
|
44
|
+
|
|
42
45
|
$navbar-nav-item-height: 80px !default;
|
|
43
|
-
$navbar-nav-item-gap: 0px !default; // Must have a unit because of `calc`
|
|
44
46
|
$navbar-nav-item-padding-horizontal: 15px !default;
|
|
45
47
|
$navbar-nav-item-color: $global-muted-color !default;
|
|
46
48
|
$navbar-nav-item-font-size: $global-font-size !default;
|
|
@@ -98,7 +100,6 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
98
100
|
|
|
99
101
|
.uk-navbar {
|
|
100
102
|
display: flex;
|
|
101
|
-
--uk-navbar-nav-item-gap: #{$navbar-nav-item-gap};
|
|
102
103
|
/* 1 */
|
|
103
104
|
position: relative;
|
|
104
105
|
@if(mixin-exists(hook-navbar)) {@include hook-navbar();}
|
|
@@ -123,17 +124,13 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
123
124
|
|
|
124
125
|
/*
|
|
125
126
|
* 1. Align navs and items vertically if they have a different height
|
|
126
|
-
* 2. Note: IE 11 requires an extra `div` which affects the center selector
|
|
127
127
|
*/
|
|
128
128
|
|
|
129
129
|
.uk-navbar-left,
|
|
130
130
|
.uk-navbar-right,
|
|
131
|
-
|
|
132
|
-
.uk-navbar-center,
|
|
133
|
-
.uk-navbar-center-left > *,
|
|
134
|
-
.uk-navbar-center-right > * {
|
|
131
|
+
[class*='uk-navbar-center'] {
|
|
135
132
|
display: flex;
|
|
136
|
-
gap:
|
|
133
|
+
gap: $navbar-gap;
|
|
137
134
|
/* 1 */
|
|
138
135
|
align-items: center;
|
|
139
136
|
}
|
|
@@ -175,8 +172,8 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
175
172
|
top: 0;
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
.uk-navbar-center-left { right: unquote('calc(100% +
|
|
179
|
-
.uk-navbar-center-right { left: unquote('calc(100% +
|
|
175
|
+
.uk-navbar-center-left { right: unquote('calc(100% + #{$navbar-gap})'); }
|
|
176
|
+
.uk-navbar-center-right { left: unquote('calc(100% + #{$navbar-gap})'); }
|
|
180
177
|
|
|
181
178
|
[class*='uk-navbar-center-'] {
|
|
182
179
|
width: max-content;
|
|
@@ -193,7 +190,7 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
193
190
|
|
|
194
191
|
.uk-navbar-nav {
|
|
195
192
|
display: flex;
|
|
196
|
-
gap:
|
|
193
|
+
gap: $navbar-nav-gap;
|
|
197
194
|
/* 1 */
|
|
198
195
|
margin: 0;
|
|
199
196
|
padding: 0;
|