uikit 3.14.3-dev.5325d42a0 → 3.14.4-dev.0097ef093
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 +11 -0
- package/dist/css/uikit-core-rtl.css +23 -14
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +23 -14
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +20 -14
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +20 -14
- 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 -10
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +89 -10
- 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 +2 -2
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +2 -2
- 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 +2 -2
- 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 -6
- 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 +669 -619
- 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 +670 -620
- 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/offcanvas.js +1 -47
- package/src/js/core/switcher.js +1 -1
- package/src/js/mixin/modal.js +90 -4
- package/src/js/mixin/parallax.js +1 -1
- package/src/js/mixin/togglable.js +0 -5
- package/src/js/util/viewport.js +20 -9
- package/src/less/components/nav.less +22 -4
- package/src/less/components/navbar.less +9 -17
- 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 +9 -17
- 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 +4 -4
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.
|
|
5
|
+
"version": "3.14.4-dev.0097ef093",
|
|
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
|
: (() => {
|
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/core/switcher.js
CHANGED
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
|
+
}
|
package/src/js/mixin/parallax.js
CHANGED
|
@@ -208,7 +208,7 @@ function backgroundFn(prop, el, stops, props) {
|
|
|
208
208
|
positions[prop] = getBackgroundPos(el, prop);
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
return setBackgroundPosFn(bgProps,
|
|
211
|
+
return setBackgroundPosFn(bgProps, positions, props);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
function backgroundCoverFn(prop, el, stops, props) {
|
package/src/js/util/viewport.js
CHANGED
|
@@ -151,18 +151,33 @@ export function scrollParents(element, overflowRe = /auto|scroll|hidden|clip/, s
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
export function offsetViewport(scrollElement) {
|
|
154
|
-
|
|
154
|
+
const window = toWindow(scrollElement);
|
|
155
|
+
const {
|
|
156
|
+
document: { body, documentElement },
|
|
157
|
+
} = window;
|
|
158
|
+
let viewportElement =
|
|
159
|
+
scrollElement === scrollingElement(scrollElement) || scrollElement === body
|
|
160
|
+
? window
|
|
161
|
+
: scrollElement;
|
|
162
|
+
|
|
163
|
+
const { visualViewport } = window;
|
|
164
|
+
if (isWindow(viewportElement) && visualViewport) {
|
|
165
|
+
let { height, width, scale, pageTop: top, pageLeft: left } = visualViewport;
|
|
166
|
+
height = Math.round(height * scale);
|
|
167
|
+
width = Math.round(width * scale);
|
|
168
|
+
return { height, width, top, left, bottom: top + height, right: left + width };
|
|
169
|
+
}
|
|
155
170
|
|
|
156
171
|
let rect = offset(viewportElement);
|
|
157
172
|
for (let [prop, dir, start, end] of [
|
|
158
173
|
['width', 'x', 'left', 'right'],
|
|
159
174
|
['height', 'y', 'top', 'bottom'],
|
|
160
175
|
]) {
|
|
161
|
-
if (
|
|
162
|
-
rect[start] += toFloat(css(viewportElement, `border${ucfirst(start)}Width`));
|
|
163
|
-
} else {
|
|
176
|
+
if (isWindow(viewportElement)) {
|
|
164
177
|
// iOS 12 returns <body> as scrollingElement
|
|
165
|
-
viewportElement =
|
|
178
|
+
viewportElement = documentElement;
|
|
179
|
+
} else {
|
|
180
|
+
rect[start] += toFloat(css(viewportElement, `border${ucfirst(start)}Width`));
|
|
166
181
|
}
|
|
167
182
|
rect[prop] = rect[dir] = viewportElement[`client${ucfirst(prop)}`];
|
|
168
183
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -173,7 +188,3 @@ export function offsetViewport(scrollElement) {
|
|
|
173
188
|
function scrollingElement(element) {
|
|
174
189
|
return toWindow(element).document.scrollingElement;
|
|
175
190
|
}
|
|
176
|
-
|
|
177
|
-
function getViewport(scrollElement) {
|
|
178
|
-
return scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
179
|
-
}
|
|
@@ -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: 0;
|
|
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,14 +172,8 @@
|
|
|
175
172
|
top: 0;
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
.uk-navbar-center-left {
|
|
179
|
-
|
|
180
|
-
right: ~'calc(100% + var(--uk-navbar-nav-item-gap))';
|
|
181
|
-
}
|
|
182
|
-
.uk-navbar-center-right {
|
|
183
|
-
left: 100%; // Fallback if gap is 0
|
|
184
|
-
left: ~'calc(100% + var(--uk-navbar-nav-item-gap))';
|
|
185
|
-
}
|
|
175
|
+
.uk-navbar-center-left { right: ~'calc(100% + @{navbar-gap})'; }
|
|
176
|
+
.uk-navbar-center-right { left: ~'calc(100% + @{navbar-gap})'; }
|
|
186
177
|
|
|
187
178
|
[class*='uk-navbar-center-'] {
|
|
188
179
|
width: max-content;
|
|
@@ -199,7 +190,7 @@
|
|
|
199
190
|
|
|
200
191
|
.uk-navbar-nav {
|
|
201
192
|
display: flex;
|
|
202
|
-
gap:
|
|
193
|
+
gap: @navbar-nav-gap;
|
|
203
194
|
/* 1 */
|
|
204
195
|
margin: 0;
|
|
205
196
|
padding: 0;
|
|
@@ -449,6 +440,7 @@
|
|
|
449
440
|
width: auto;
|
|
450
441
|
/* 2 */
|
|
451
442
|
--uk-position-offset: @navbar-dropdown-dropbar-margin-top;
|
|
443
|
+
--uk-position-viewport-offset: 0;
|
|
452
444
|
/* 3 */
|
|
453
445
|
margin-bottom: @navbar-dropdown-dropbar-margin-bottom;
|
|
454
446
|
/* 4 */
|
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: 0 !default;
|
|
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,14 +172,8 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
175
172
|
top: 0;
|
|
176
173
|
}
|
|
177
174
|
|
|
178
|
-
.uk-navbar-center-left {
|
|
179
|
-
|
|
180
|
-
right: unquote('calc(100% + var(--uk-navbar-nav-item-gap))');
|
|
181
|
-
}
|
|
182
|
-
.uk-navbar-center-right {
|
|
183
|
-
left: 100%; // Fallback if gap is 0
|
|
184
|
-
left: unquote('calc(100% + var(--uk-navbar-nav-item-gap))');
|
|
185
|
-
}
|
|
175
|
+
.uk-navbar-center-left { right: unquote('calc(100% + #{$navbar-gap})'); }
|
|
176
|
+
.uk-navbar-center-right { left: unquote('calc(100% + #{$navbar-gap})'); }
|
|
186
177
|
|
|
187
178
|
[class*='uk-navbar-center-'] {
|
|
188
179
|
width: max-content;
|
|
@@ -199,7 +190,7 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
199
190
|
|
|
200
191
|
.uk-navbar-nav {
|
|
201
192
|
display: flex;
|
|
202
|
-
gap:
|
|
193
|
+
gap: $navbar-nav-gap;
|
|
203
194
|
/* 1 */
|
|
204
195
|
margin: 0;
|
|
205
196
|
padding: 0;
|
|
@@ -449,6 +440,7 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
|
|
|
449
440
|
width: auto;
|
|
450
441
|
/* 2 */
|
|
451
442
|
--uk-position-offset: #{$navbar-dropdown-dropbar-margin-top};
|
|
443
|
+
--uk-position-viewport-offset: 0;
|
|
452
444
|
/* 3 */
|
|
453
445
|
margin-bottom: $navbar-dropdown-dropbar-margin-bottom;
|
|
454
446
|
/* 4 */
|