uikit 3.13.1-dev.dedbd3fce → 3.13.2-dev.696f00752
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/.eslintrc.json +9 -0
- package/CHANGELOG.md +22 -0
- package/dist/css/uikit-core-rtl.css +31 -71
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +31 -71
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +31 -71
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +31 -71
- 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 +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- 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 +60 -31
- 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 +218 -208
- 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 +220 -211
- package/dist/js/uikit.min.js +1 -1
- package/package.json +10 -10
- package/src/js/components/tooltip.js +2 -3
- package/src/js/core/cover.js +1 -1
- package/src/js/core/drop.js +7 -10
- package/src/js/core/navbar.js +12 -13
- package/src/js/core/responsive.js +1 -1
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/switcher.js +7 -13
- package/src/js/mixin/media.js +4 -4
- package/src/js/mixin/position.js +53 -24
- package/src/js/util/dimensions.js +2 -2
- package/src/js/util/position.js +125 -129
- package/src/js/util/style.js +13 -19
- package/src/less/components/drop.less +3 -11
- package/src/less/components/dropdown.less +3 -11
- package/src/less/components/navbar.less +13 -23
- package/src/less/components/offcanvas.less +19 -1
- package/src/less/components/tooltip.less +2 -11
- package/src/less/theme/navbar.less +1 -3
- package/src/scss/components/drop.scss +3 -11
- package/src/scss/components/dropdown.scss +3 -11
- package/src/scss/components/navbar.scss +13 -23
- package/src/scss/components/offcanvas.scss +19 -1
- package/src/scss/components/tooltip.scss +2 -11
- package/src/scss/mixins-theme.scss +1 -2
- package/src/scss/mixins.scss +0 -1
- package/src/scss/theme/navbar.scss +0 -2
- package/src/scss/variables-theme.scss +7 -5
- package/src/scss/variables.scss +7 -5
- package/tests/drop.html +1 -1
- package/tests/navbar.html +2 -8
- package/tests/position.html +38 -39
- package/tests/search.html +1 -1
package/src/js/util/position.js
CHANGED
|
@@ -1,156 +1,152 @@
|
|
|
1
1
|
import { offset } from './dimensions';
|
|
2
|
-
import {
|
|
2
|
+
import { clamp, includes } from './lang';
|
|
3
3
|
import { getViewport, scrollParents } from './viewport';
|
|
4
4
|
|
|
5
|
-
const dirs =
|
|
6
|
-
width
|
|
7
|
-
height
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export function positionAt(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
5
|
+
const dirs = [
|
|
6
|
+
['width', 'x', 'left', 'right'],
|
|
7
|
+
['height', 'y', 'top', 'bottom'],
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
export function positionAt(element, target, options) {
|
|
11
|
+
options = {
|
|
12
|
+
attach: {
|
|
13
|
+
element: ['left', 'top'],
|
|
14
|
+
target: ['left', 'top'],
|
|
15
|
+
...options.attach,
|
|
16
|
+
},
|
|
17
|
+
offset: [0, 0],
|
|
18
|
+
...options,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const dim = options.flip
|
|
22
|
+
? attachToWithFlip(element, target, options)
|
|
23
|
+
: attachTo(element, target, options);
|
|
24
|
+
|
|
25
|
+
offset(element, dim);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function attachTo(element, target, options) {
|
|
29
|
+
let { attach, offset: offsetBy } = {
|
|
30
|
+
attach: {
|
|
31
|
+
element: ['left', 'top'],
|
|
32
|
+
target: ['left', 'top'],
|
|
33
|
+
...options.attach,
|
|
34
|
+
},
|
|
35
|
+
offset: [0, 0],
|
|
36
|
+
...options,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const position = offset(element);
|
|
40
|
+
const targetOffset = offset(target);
|
|
41
|
+
for (const i in dirs) {
|
|
42
|
+
const [prop, dir, start, end] = dirs[i];
|
|
43
|
+
position[start] = position[dir] =
|
|
44
|
+
targetOffset[start] +
|
|
45
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
46
|
+
moveBy(attach.element[i], end, position[prop]) +
|
|
47
|
+
+offsetBy[i];
|
|
48
|
+
position[end] = position[start] + position[prop];
|
|
27
49
|
}
|
|
50
|
+
return position;
|
|
51
|
+
}
|
|
28
52
|
|
|
29
|
-
|
|
53
|
+
function attachToWithFlip(element, target, options) {
|
|
54
|
+
const position = attachTo(element, target, options);
|
|
30
55
|
const targetDim = offset(target);
|
|
31
|
-
const
|
|
56
|
+
const viewports = scrollParents(element).map(getViewport);
|
|
57
|
+
|
|
58
|
+
let {
|
|
59
|
+
flip,
|
|
60
|
+
attach: { element: elAttach, target: targetAttach },
|
|
61
|
+
offset: elOffset,
|
|
62
|
+
boundary,
|
|
63
|
+
viewport,
|
|
64
|
+
} = options;
|
|
32
65
|
|
|
33
|
-
|
|
34
|
-
moveTo(position, targetAttach, targetDim, 1);
|
|
66
|
+
viewports.push(viewport);
|
|
35
67
|
|
|
36
|
-
|
|
37
|
-
|
|
68
|
+
for (const i in dirs) {
|
|
69
|
+
const [prop, dir, start, end] = dirs[i];
|
|
38
70
|
|
|
39
|
-
|
|
40
|
-
|
|
71
|
+
if (flip !== true && !includes(flip, dir)) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
41
74
|
|
|
42
|
-
|
|
43
|
-
|
|
75
|
+
const willFlip =
|
|
76
|
+
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
44
77
|
|
|
45
|
-
|
|
46
|
-
|
|
78
|
+
viewport = getIntersectionArea(...viewports, willFlip ? null : boundary);
|
|
79
|
+
const isInStartBoundary = position[start] >= viewport[start];
|
|
80
|
+
const isInEndBoundary = position[end] <= viewport[end];
|
|
47
81
|
|
|
48
|
-
if (
|
|
49
|
-
|
|
82
|
+
if (isInStartBoundary && isInEndBoundary) {
|
|
83
|
+
continue;
|
|
50
84
|
}
|
|
51
85
|
|
|
52
|
-
|
|
86
|
+
let offsetBy;
|
|
53
87
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
88
|
+
// Flip
|
|
89
|
+
if (willFlip) {
|
|
90
|
+
if (
|
|
91
|
+
(elAttach[i] === end && isInStartBoundary) ||
|
|
92
|
+
(elAttach[i] === start && isInEndBoundary)
|
|
93
|
+
) {
|
|
94
|
+
continue;
|
|
57
95
|
}
|
|
58
96
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
position[
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
(elAttach[dir] === 'center' &&
|
|
84
|
-
(apply(centerOffset, centerTargetOffset) ||
|
|
85
|
-
apply(-centerOffset, -centerTargetOffset))) ||
|
|
86
|
-
apply(elemOffset, targetOffset)
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function apply(elemOffset, targetOffset) {
|
|
91
|
-
const newVal = toFloat(
|
|
92
|
-
(position[align] + elemOffset + targetOffset - elOffset[dir] * 2).toFixed(4)
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) {
|
|
96
|
-
position[align] = newVal;
|
|
97
|
-
|
|
98
|
-
for (const el of ['element', 'target']) {
|
|
99
|
-
if (elemOffset) {
|
|
100
|
-
flipped[el][dir] =
|
|
101
|
-
flipped[el][dir] === dirs[prop][1]
|
|
102
|
-
? dirs[prop][2]
|
|
103
|
-
: dirs[prop][1];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
}
|
|
97
|
+
offsetBy =
|
|
98
|
+
(elAttach[i] === start
|
|
99
|
+
? -position[prop]
|
|
100
|
+
: elAttach[i] === end
|
|
101
|
+
? position[prop]
|
|
102
|
+
: 0) +
|
|
103
|
+
(targetAttach[i] === start
|
|
104
|
+
? targetDim[prop]
|
|
105
|
+
: targetAttach[i] === end
|
|
106
|
+
? -targetDim[prop]
|
|
107
|
+
: 0) -
|
|
108
|
+
elOffset[i] * 2;
|
|
109
|
+
|
|
110
|
+
// Move
|
|
111
|
+
} else {
|
|
112
|
+
offsetBy =
|
|
113
|
+
clamp(
|
|
114
|
+
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
115
|
+
targetDim[start] - position[prop] + elOffset[i],
|
|
116
|
+
targetDim[end] - elOffset[i]
|
|
117
|
+
) - position[start];
|
|
118
|
+
}
|
|
113
119
|
|
|
114
|
-
|
|
120
|
+
position[start] = position[dir] = position[start] + offsetBy;
|
|
121
|
+
position[end] += offsetBy;
|
|
122
|
+
}
|
|
115
123
|
|
|
116
|
-
return
|
|
124
|
+
return position;
|
|
117
125
|
}
|
|
118
126
|
|
|
119
|
-
function
|
|
120
|
-
|
|
121
|
-
if (attach[dir] === alignFlip) {
|
|
122
|
-
position[align] += dim[prop] * factor;
|
|
123
|
-
} else if (attach[dir] === 'center') {
|
|
124
|
-
position[align] += (dim[prop] * factor) / 2;
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
+
function moveBy(start, end, dim) {
|
|
128
|
+
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
function
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
131
|
+
function getIntersectionArea(...elements) {
|
|
132
|
+
let intersection;
|
|
133
|
+
for (const el of elements.filter(Boolean)) {
|
|
134
|
+
const rect = offset(el);
|
|
135
|
+
if (!intersection) {
|
|
136
|
+
intersection = rect;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
for (const prop of ['left', 'top']) {
|
|
140
|
+
intersection[prop] = Math.max(rect[prop], intersection[prop]);
|
|
141
|
+
}
|
|
142
|
+
for (const prop of ['right', 'bottom']) {
|
|
143
|
+
intersection[prop] = Math.min(rect[prop], intersection[prop]);
|
|
144
|
+
}
|
|
141
145
|
}
|
|
142
|
-
|
|
143
|
-
return {
|
|
144
|
-
x: x.test(pos[0]) ? pos[0] : 'center',
|
|
145
|
-
y: y.test(pos[1]) ? pos[1] : 'center',
|
|
146
|
-
};
|
|
146
|
+
return intersection;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
function
|
|
150
|
-
const [
|
|
151
|
-
|
|
152
|
-
return {
|
|
153
|
-
x: x ? toFloat(x) * (endsWith(x, '%') ? width / 100 : 1) : 0,
|
|
154
|
-
y: y ? toFloat(y) * (endsWith(y, '%') ? height / 100 : 1) : 0,
|
|
155
|
-
};
|
|
149
|
+
function intersectLine(dimA, dimB, dir) {
|
|
150
|
+
const [, , start, end] = dirs[dir];
|
|
151
|
+
return dimA[end] > dimB[start] && dimB[end] > dimA[start];
|
|
156
152
|
}
|
package/src/js/util/style.js
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
isUndefined,
|
|
10
10
|
memoize,
|
|
11
11
|
toNodes,
|
|
12
|
-
toWindow,
|
|
13
12
|
} from './lang';
|
|
14
13
|
|
|
15
14
|
const cssNumber = {
|
|
@@ -37,21 +36,22 @@ export function css(element, property, value, priority = '') {
|
|
|
37
36
|
property = propName(property);
|
|
38
37
|
|
|
39
38
|
if (isUndefined(value)) {
|
|
40
|
-
return
|
|
41
|
-
} else if (!value && !isNumber(value)) {
|
|
42
|
-
element.style.removeProperty(property);
|
|
39
|
+
return getComputedStyle(element).getPropertyValue(property);
|
|
43
40
|
} else {
|
|
44
41
|
element.style.setProperty(
|
|
45
42
|
property,
|
|
46
|
-
isNumeric(value) && !cssNumber[property]
|
|
43
|
+
isNumeric(value) && !cssNumber[property]
|
|
44
|
+
? `${value}px`
|
|
45
|
+
: value || isNumber(value)
|
|
46
|
+
? value
|
|
47
|
+
: '',
|
|
47
48
|
priority
|
|
48
49
|
);
|
|
49
50
|
}
|
|
50
51
|
} else if (isArray(property)) {
|
|
51
|
-
const styles = getStyles(element);
|
|
52
52
|
const props = {};
|
|
53
53
|
for (const prop of property) {
|
|
54
|
-
props[prop] =
|
|
54
|
+
props[prop] = css(element, prop);
|
|
55
55
|
}
|
|
56
56
|
return props;
|
|
57
57
|
} else if (isObject(property)) {
|
|
@@ -62,19 +62,9 @@ export function css(element, property, value, priority = '') {
|
|
|
62
62
|
return elements[0];
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
function getStyles(element, pseudoElt) {
|
|
66
|
-
return toWindow(element).getComputedStyle(element, pseudoElt);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function getStyle(element, property, pseudoElt) {
|
|
70
|
-
return getStyles(element, pseudoElt)[property];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
65
|
const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
|
|
74
|
-
export function getCssVar(name) {
|
|
75
|
-
return
|
|
76
|
-
.getPropertyValue(`--uk-${name}`)
|
|
77
|
-
.replace(propertyRe, '$2');
|
|
66
|
+
export function getCssVar(name, element = document.documentElement) {
|
|
67
|
+
return css(element, `--uk-${name}`).replace(propertyRe, '$2');
|
|
78
68
|
}
|
|
79
69
|
|
|
80
70
|
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
|
|
@@ -83,6 +73,10 @@ export const propName = memoize((name) => vendorPropName(name));
|
|
|
83
73
|
const cssPrefixes = ['webkit', 'moz'];
|
|
84
74
|
|
|
85
75
|
function vendorPropName(name) {
|
|
76
|
+
if (name[0] === '-') {
|
|
77
|
+
return name;
|
|
78
|
+
}
|
|
79
|
+
|
|
86
80
|
name = hyphenate(name);
|
|
87
81
|
|
|
88
82
|
const { style } = document.documentElement;
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
@drop-z-index: @global-z-index + 20;
|
|
24
|
-
@drop-width: 300px;
|
|
25
24
|
@drop-margin: @global-margin;
|
|
25
|
+
@drop-width: 300px;
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
/* ========================================================================
|
|
@@ -41,25 +41,17 @@
|
|
|
41
41
|
/* 2 */
|
|
42
42
|
position: absolute;
|
|
43
43
|
z-index: @drop-z-index;
|
|
44
|
+
--uk-position-margin-offset: @drop-margin;
|
|
44
45
|
/* 3 */
|
|
45
46
|
box-sizing: border-box;
|
|
46
47
|
width: @drop-width;
|
|
48
|
+
max-width: 100vw;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
/* Show */
|
|
50
52
|
.uk-drop.uk-open { display: block; }
|
|
51
53
|
|
|
52
54
|
|
|
53
|
-
/* Direction / Alignment modifiers
|
|
54
|
-
========================================================================== */
|
|
55
|
-
|
|
56
|
-
/* Direction */
|
|
57
|
-
[class*='uk-drop-top'] { margin-top: -@drop-margin; }
|
|
58
|
-
[class*='uk-drop-bottom'] { margin-top: @drop-margin; }
|
|
59
|
-
[class*='uk-drop-left'] { margin-left: -@drop-margin; }
|
|
60
|
-
[class*='uk-drop-right'] { margin-left: @drop-margin; }
|
|
61
|
-
|
|
62
|
-
|
|
63
55
|
/* Grid modifiers
|
|
64
56
|
========================================================================== */
|
|
65
57
|
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
@dropdown-z-index: @global-z-index + 20;
|
|
24
|
+
@dropdown-margin: @global-small-margin;
|
|
24
25
|
@dropdown-min-width: 200px;
|
|
25
26
|
@dropdown-padding: 15px;
|
|
26
27
|
@dropdown-background: @global-muted-background;
|
|
27
28
|
@dropdown-color: @global-color;
|
|
28
|
-
@dropdown-margin: @global-small-margin;
|
|
29
29
|
|
|
30
30
|
@dropdown-nav-item-color: @global-muted-color;
|
|
31
31
|
@dropdown-nav-item-hover-color: @global-color;
|
|
@@ -53,9 +53,11 @@
|
|
|
53
53
|
/* 2 */
|
|
54
54
|
position: absolute;
|
|
55
55
|
z-index: @dropdown-z-index;
|
|
56
|
+
--uk-position-margin-offset: @dropdown-margin;
|
|
56
57
|
/* 3 */
|
|
57
58
|
box-sizing: border-box;
|
|
58
59
|
min-width: @dropdown-min-width;
|
|
60
|
+
max-width: 100vw;
|
|
59
61
|
/* 4 */
|
|
60
62
|
padding: @dropdown-padding;
|
|
61
63
|
background: @dropdown-background;
|
|
@@ -120,16 +122,6 @@
|
|
|
120
122
|
.uk-dropdown-nav .uk-nav-sub li.uk-active > a { color: @dropdown-nav-sublist-item-hover-color; }
|
|
121
123
|
|
|
122
124
|
|
|
123
|
-
/* Direction / Alignment modifiers
|
|
124
|
-
========================================================================== */
|
|
125
|
-
|
|
126
|
-
/* Direction */
|
|
127
|
-
[class*='uk-dropdown-top'] { margin-top: -@dropdown-margin; }
|
|
128
|
-
[class*='uk-dropdown-bottom'] { margin-top: @dropdown-margin; }
|
|
129
|
-
[class*='uk-dropdown-left'] { margin-left: -@dropdown-margin; }
|
|
130
|
-
[class*='uk-dropdown-right'] { margin-left: @dropdown-margin; }
|
|
131
|
-
|
|
132
|
-
|
|
133
125
|
/* Grid modifiers
|
|
134
126
|
========================================================================== */
|
|
135
127
|
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
@navbar-subtitle-font-size: @global-small-font-size;
|
|
57
57
|
|
|
58
58
|
@navbar-dropdown-z-index: @global-z-index + 20;
|
|
59
|
-
@navbar-dropdown-width: 200px;
|
|
60
59
|
@navbar-dropdown-margin: 0;
|
|
60
|
+
@navbar-dropdown-width: 200px;
|
|
61
61
|
@navbar-dropdown-padding: 15px;
|
|
62
62
|
@navbar-dropdown-background: @global-muted-background;
|
|
63
63
|
@navbar-dropdown-color: @global-color;
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
@navbar-dropdown-dropbar-margin-top: 0;
|
|
68
68
|
@navbar-dropdown-dropbar-margin-bottom: @navbar-dropdown-dropbar-margin-top;
|
|
69
|
+
@navbar-dropdown-dropbar-padding: @navbar-nav-item-padding-horizontal;
|
|
69
70
|
|
|
70
71
|
@navbar-dropdown-nav-item-color: @global-muted-color;
|
|
71
72
|
@navbar-dropdown-nav-item-hover-color: @global-color;
|
|
@@ -348,9 +349,11 @@
|
|
|
348
349
|
/* 2 */
|
|
349
350
|
position: absolute;
|
|
350
351
|
z-index: @navbar-dropdown-z-index;
|
|
352
|
+
--uk-position-margin-offset: @navbar-dropdown-margin;
|
|
351
353
|
/* 3 */
|
|
352
354
|
box-sizing: border-box;
|
|
353
355
|
width: @navbar-dropdown-width;
|
|
356
|
+
max-width: 100vw;
|
|
354
357
|
/* 4 */
|
|
355
358
|
padding: @navbar-dropdown-padding;
|
|
356
359
|
background: @navbar-dropdown-background;
|
|
@@ -361,16 +364,6 @@
|
|
|
361
364
|
/* Show */
|
|
362
365
|
.uk-navbar-dropdown.uk-open { display: block; }
|
|
363
366
|
|
|
364
|
-
/*
|
|
365
|
-
* Direction / Alignment modifiers
|
|
366
|
-
*/
|
|
367
|
-
|
|
368
|
-
/* Direction */
|
|
369
|
-
[class*='uk-navbar-dropdown-top'] { margin-top: -@navbar-dropdown-margin; }
|
|
370
|
-
[class*='uk-navbar-dropdown-bottom'] { margin-top: @navbar-dropdown-margin; }
|
|
371
|
-
[class*='uk-navbar-dropdown-left'] { margin-left: -@navbar-dropdown-margin; }
|
|
372
|
-
[class*='uk-navbar-dropdown-right'] { margin-left: @navbar-dropdown-margin; }
|
|
373
|
-
|
|
374
367
|
/*
|
|
375
368
|
* Grid
|
|
376
369
|
* Adopts `uk-grid`
|
|
@@ -397,11 +390,17 @@
|
|
|
397
390
|
|
|
398
391
|
/*
|
|
399
392
|
* Dropbar modifier
|
|
393
|
+
* 1. Set position
|
|
394
|
+
* 2. Bottom padding for dropbar
|
|
395
|
+
* 3. Horizontal padding
|
|
400
396
|
*/
|
|
401
397
|
|
|
402
398
|
.uk-navbar-dropdown-dropbar {
|
|
403
|
-
|
|
399
|
+
/* 1 */
|
|
400
|
+
--uk-position-margin-offset: @navbar-dropdown-dropbar-margin-top;
|
|
401
|
+
/* 2 */
|
|
404
402
|
margin-bottom: @navbar-dropdown-dropbar-margin-bottom;
|
|
403
|
+
padding: @navbar-dropdown-dropbar-padding;
|
|
405
404
|
.hook-navbar-dropdown-dropbar();
|
|
406
405
|
}
|
|
407
406
|
|
|
@@ -468,20 +467,12 @@
|
|
|
468
467
|
========================================================================== */
|
|
469
468
|
|
|
470
469
|
.uk-navbar-dropbar {
|
|
471
|
-
background: @navbar-dropbar-background;
|
|
472
|
-
.hook-navbar-dropbar();
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/*
|
|
476
|
-
* Slide modifier
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
|
-
.uk-navbar-dropbar-slide {
|
|
480
470
|
position: absolute;
|
|
481
471
|
z-index: @navbar-dropbar-z-index;
|
|
482
472
|
left: 0;
|
|
483
473
|
right: 0;
|
|
484
|
-
|
|
474
|
+
background: @navbar-dropbar-background;
|
|
475
|
+
.hook-navbar-dropbar();
|
|
485
476
|
}
|
|
486
477
|
|
|
487
478
|
|
|
@@ -514,7 +505,6 @@
|
|
|
514
505
|
.hook-navbar-dropdown-nav-header() {}
|
|
515
506
|
.hook-navbar-dropdown-nav-divider() {}
|
|
516
507
|
.hook-navbar-dropbar(){}
|
|
517
|
-
.hook-navbar-dropbar-slide(){}
|
|
518
508
|
.hook-navbar-misc() {}
|
|
519
509
|
|
|
520
510
|
|
|
@@ -35,9 +35,11 @@
|
|
|
35
35
|
@offcanvas-bar-padding-vertical-m: @global-medium-gutter;
|
|
36
36
|
@offcanvas-bar-padding-horizontal-m: @global-medium-gutter;
|
|
37
37
|
|
|
38
|
-
@offcanvas-close-position:
|
|
38
|
+
@offcanvas-close-position: 5px;
|
|
39
39
|
@offcanvas-close-padding: 5px;
|
|
40
40
|
|
|
41
|
+
@offcanvas-close-position-m: 20px;
|
|
42
|
+
|
|
41
43
|
@offcanvas-overlay-background: rgba(0,0,0,0.1);
|
|
42
44
|
|
|
43
45
|
|
|
@@ -206,6 +208,22 @@
|
|
|
206
208
|
.hook-offcanvas-close();
|
|
207
209
|
}
|
|
208
210
|
|
|
211
|
+
/* Tablet landscape and bigger */
|
|
212
|
+
@media (min-width: @breakpoint-medium) {
|
|
213
|
+
|
|
214
|
+
.uk-offcanvas-close {
|
|
215
|
+
top: @offcanvas-close-position-m;
|
|
216
|
+
right: @offcanvas-close-position-m;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/*
|
|
222
|
+
* Remove margin from adjacent element
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
.uk-offcanvas-close:first-child + * { margin-top: 0; }
|
|
226
|
+
|
|
209
227
|
|
|
210
228
|
/* Overlay
|
|
211
229
|
========================================================================== */
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
@tooltip-z-index: @global-z-index + 30;
|
|
24
|
+
@tooltip-margin: 10px;
|
|
24
25
|
@tooltip-max-width: 200px;
|
|
25
26
|
@tooltip-padding-vertical: 3px;
|
|
26
27
|
@tooltip-padding-horizontal: 6px;
|
|
@@ -29,7 +30,6 @@
|
|
|
29
30
|
@tooltip-color: @global-inverse-color;
|
|
30
31
|
@tooltip-font-size: 12px;
|
|
31
32
|
|
|
32
|
-
@tooltip-margin: 10px;
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
/* ========================================================================
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
/* 2 */
|
|
51
51
|
position: absolute;
|
|
52
52
|
z-index: @tooltip-z-index;
|
|
53
|
+
--uk-position-margin-offset: @dropdown-margin;
|
|
53
54
|
/* 3 */
|
|
54
55
|
top: 0;
|
|
55
56
|
/* 4 */
|
|
@@ -68,16 +69,6 @@
|
|
|
68
69
|
.uk-tooltip.uk-active { display: block; }
|
|
69
70
|
|
|
70
71
|
|
|
71
|
-
/* Direction / Alignment modifiers
|
|
72
|
-
========================================================================== */
|
|
73
|
-
|
|
74
|
-
/* Direction */
|
|
75
|
-
[class*='uk-tooltip-top'] { margin-top: -@tooltip-margin; }
|
|
76
|
-
[class*='uk-tooltip-bottom'] { margin-top: @tooltip-margin; }
|
|
77
|
-
[class*='uk-tooltip-left'] { margin-left: -@tooltip-margin; }
|
|
78
|
-
[class*='uk-tooltip-right'] { margin-left: @tooltip-margin; }
|
|
79
|
-
|
|
80
|
-
|
|
81
72
|
// Hooks
|
|
82
73
|
// ========================================================================
|
|
83
74
|
|
|
@@ -117,9 +117,7 @@
|
|
|
117
117
|
// Dropbar
|
|
118
118
|
// ========================================================================
|
|
119
119
|
|
|
120
|
-
.hook-navbar-dropbar() {}
|
|
121
|
-
|
|
122
|
-
.hook-navbar-dropbar-slide() { box-shadow: @navbar-dropbar-box-shadow; }
|
|
120
|
+
.hook-navbar-dropbar() { box-shadow: @navbar-dropbar-box-shadow; }
|
|
123
121
|
|
|
124
122
|
|
|
125
123
|
// Miscellaneous
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
// ========================================================================
|
|
22
22
|
|
|
23
23
|
$drop-z-index: $global-z-index + 20 !default;
|
|
24
|
-
$drop-width: 300px !default;
|
|
25
24
|
$drop-margin: $global-margin !default;
|
|
25
|
+
$drop-width: 300px !default;
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
/* ========================================================================
|
|
@@ -41,25 +41,17 @@ $drop-margin: $global-margin !default;
|
|
|
41
41
|
/* 2 */
|
|
42
42
|
position: absolute;
|
|
43
43
|
z-index: $drop-z-index;
|
|
44
|
+
--uk-position-margin-offset: #{$drop-margin};
|
|
44
45
|
/* 3 */
|
|
45
46
|
box-sizing: border-box;
|
|
46
47
|
width: $drop-width;
|
|
48
|
+
max-width: 100vw;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
/* Show */
|
|
50
52
|
.uk-drop.uk-open { display: block; }
|
|
51
53
|
|
|
52
54
|
|
|
53
|
-
/* Direction / Alignment modifiers
|
|
54
|
-
========================================================================== */
|
|
55
|
-
|
|
56
|
-
/* Direction */
|
|
57
|
-
[class*='uk-drop-top'] { margin-top: (-$drop-margin); }
|
|
58
|
-
[class*='uk-drop-bottom'] { margin-top: $drop-margin; }
|
|
59
|
-
[class*='uk-drop-left'] { margin-left: (-$drop-margin); }
|
|
60
|
-
[class*='uk-drop-right'] { margin-left: $drop-margin; }
|
|
61
|
-
|
|
62
|
-
|
|
63
55
|
/* Grid modifiers
|
|
64
56
|
========================================================================== */
|
|
65
57
|
|