uikit 3.14.2-dev.abf300d01 → 3.14.2-dev.c7c85455d

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.
Files changed (86) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/css/uikit-core-rtl.css +47 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +47 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +51 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +51 -2
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +101 -22
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +101 -22
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +70 -35
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +55 -35
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +55 -35
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +135 -44
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +214 -94
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +283 -128
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/parallax.js +15 -0
  44. package/src/js/core/accordion.js +3 -3
  45. package/src/js/core/alert.js +1 -1
  46. package/src/js/core/drop.js +40 -20
  47. package/src/js/core/height-viewport.js +14 -9
  48. package/src/js/core/navbar.js +11 -9
  49. package/src/js/core/scrollspy.js +4 -0
  50. package/src/js/core/toggle.js +5 -8
  51. package/src/js/mixin/parallax.js +54 -34
  52. package/src/js/mixin/position.js +44 -23
  53. package/src/js/mixin/togglable.js +105 -24
  54. package/src/js/util/animation.js +1 -0
  55. package/src/js/util/viewport.js +1 -1
  56. package/src/less/components/drop.less +17 -4
  57. package/src/less/components/dropdown.less +19 -4
  58. package/src/less/components/margin.less +13 -14
  59. package/src/less/components/nav.less +1 -1
  60. package/src/less/components/navbar.less +32 -11
  61. package/src/less/components/position.less +1 -1
  62. package/src/less/components/sticky.less +7 -0
  63. package/src/less/components/utility.less +0 -1
  64. package/src/less/theme/dropdown.less +11 -0
  65. package/src/less/theme/navbar.less +7 -0
  66. package/src/scss/components/drop.scss +17 -4
  67. package/src/scss/components/dropdown.scss +19 -4
  68. package/src/scss/components/margin.scss +13 -14
  69. package/src/scss/components/nav.scss +1 -1
  70. package/src/scss/components/navbar.scss +21 -0
  71. package/src/scss/components/position.scss +1 -1
  72. package/src/scss/components/sticky.scss +7 -0
  73. package/src/scss/components/utility.scss +0 -1
  74. package/src/scss/mixins-theme.scss +8 -0
  75. package/src/scss/mixins.scss +2 -0
  76. package/src/scss/theme/dropdown.scss +8 -0
  77. package/src/scss/theme/navbar.scss +4 -0
  78. package/src/scss/variables-theme.scss +3 -0
  79. package/src/scss/variables.scss +1 -0
  80. package/tests/drop.html +145 -2
  81. package/tests/dropdown.html +228 -13
  82. package/tests/height-viewport.html +62 -0
  83. package/tests/navbar.html +321 -14
  84. package/tests/sticky-navbar.html +132 -0
  85. package/tests/sticky-parallax.html +2 -1
  86. package/tests/sticky.html +5 -4
@@ -5,13 +5,15 @@ import {
5
5
  css,
6
6
  fastdom,
7
7
  hasClass,
8
- height,
9
8
  includes,
10
9
  isBoolean,
11
10
  isFunction,
12
11
  isVisible,
13
12
  noop,
13
+ offset,
14
14
  removeClass,
15
+ scrollParents,
16
+ startsWith,
15
17
  toFloat,
16
18
  toggleClass,
17
19
  toNodes,
@@ -41,7 +43,7 @@ export default {
41
43
 
42
44
  initProps: {
43
45
  overflow: '',
44
- height: '',
46
+ maxHeight: '',
45
47
  paddingTop: '',
46
48
  paddingBottom: '',
47
49
  marginTop: '',
@@ -51,7 +53,7 @@ export default {
51
53
 
52
54
  hideProps: {
53
55
  overflow: 'hidden',
54
- height: 0,
56
+ maxHeight: 0,
55
57
  paddingTop: 0,
56
58
  paddingBottom: 0,
57
59
  marginTop: 0,
@@ -66,7 +68,7 @@ export default {
66
68
  },
67
69
 
68
70
  hasTransition({ animation }) {
69
- return this.hasAnimation && animation[0] === true;
71
+ return startsWith(animation[0], 'slide');
70
72
  },
71
73
  },
72
74
 
@@ -81,18 +83,13 @@ export default {
81
83
  return Promise.reject();
82
84
  }
83
85
 
84
- if (!animate) {
85
- Animation.cancel(el);
86
- Transition.cancel(el);
87
- }
88
-
89
86
  const promise = (
90
87
  isFunction(animate)
91
88
  ? animate
92
89
  : animate === false || !this.hasAnimation
93
- ? this._toggle
90
+ ? toggleInstant(this)
94
91
  : this.hasTransition
95
- ? toggleHeight(this)
92
+ ? toggleTransition(this)
96
93
  : toggleAnimation(this)
97
94
  )(el, show);
98
95
 
@@ -156,7 +153,25 @@ export default {
156
153
  },
157
154
  };
158
155
 
159
- export function toggleHeight({
156
+ function toggleInstant({ _toggle }) {
157
+ return (el, show) => {
158
+ Animation.cancel(el);
159
+ Transition.cancel(el);
160
+ return _toggle(el, show);
161
+ };
162
+ }
163
+
164
+ function toggleTransition(cmp) {
165
+ switch (cmp.animation[0]) {
166
+ case 'slide-left':
167
+ return slideHorizontal(cmp);
168
+ case 'slide-right':
169
+ return slideHorizontal(cmp, true);
170
+ }
171
+ return slide(cmp);
172
+ }
173
+
174
+ export function slide({
160
175
  isToggled,
161
176
  duration,
162
177
  velocity,
@@ -167,11 +182,14 @@ export function toggleHeight({
167
182
  }) {
168
183
  return (el, show) => {
169
184
  const inProgress = Transition.inProgress(el);
170
- const inner = el.hasChildNodes()
171
- ? toFloat(css(el.firstElementChild, 'marginTop')) +
172
- toFloat(css(el.lastElementChild, 'marginBottom'))
173
- : 0;
174
- const currentHeight = isVisible(el) ? height(el) + (inProgress ? 0 : inner) : 0;
185
+ const inner =
186
+ !inProgress && el.hasChildNodes()
187
+ ? toFloat(css(el.firstElementChild, 'marginTop')) +
188
+ toFloat(css(el.lastElementChild, 'marginBottom'))
189
+ : 0;
190
+ const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
191
+
192
+ const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
175
193
 
176
194
  Transition.cancel(el);
177
195
 
@@ -179,34 +197,97 @@ export function toggleHeight({
179
197
  _toggle(el, true);
180
198
  }
181
199
 
182
- height(el, '');
200
+ css(el, 'maxHeight', '');
183
201
 
184
202
  // Update child components first
185
203
  fastdom.flush();
186
204
 
187
- const endHeight = height(el) + (inProgress ? 0 : inner);
188
- duration = velocity * el.offsetHeight + duration;
205
+ const endHeight = toFloat(css(el, 'height')) + inner;
206
+ duration = velocity * endHeight + duration;
189
207
 
190
- height(el, currentHeight);
208
+ css(el, { ...props, maxHeight: currentHeight });
191
209
 
192
210
  return (
193
211
  show
194
212
  ? Transition.start(
195
213
  el,
196
- { ...initProps, overflow: 'hidden', height: endHeight },
197
- Math.round(duration * (1 - currentHeight / endHeight)),
214
+ { ...initProps, overflow: 'hidden', maxHeight: endHeight },
215
+ duration * (1 - currentHeight / endHeight),
198
216
  transition
199
217
  )
200
218
  : Transition.start(
201
219
  el,
202
220
  hideProps,
203
- Math.round(duration * (currentHeight / endHeight)),
221
+ duration * (currentHeight / endHeight),
204
222
  transition
205
223
  ).then(() => _toggle(el, false))
206
224
  ).then(() => css(el, initProps));
207
225
  };
208
226
  }
209
227
 
228
+ function slideHorizontal({ isToggled, duration, velocity, transition, _toggle }, right) {
229
+ return (el, show) => {
230
+ const visible = isVisible(el);
231
+ const marginLeft = toFloat(css(el, 'marginLeft'));
232
+
233
+ Transition.cancel(el);
234
+
235
+ const [scrollElement] = scrollParents(el);
236
+ css(scrollElement, 'overflowX', 'hidden');
237
+
238
+ if (!isToggled(el)) {
239
+ _toggle(el, true);
240
+ }
241
+
242
+ const width = toFloat(css(el, 'width'));
243
+ duration = velocity * width + duration;
244
+
245
+ const percent = visible ? ((width + marginLeft * (right ? -1 : 1)) / width) * 100 : 0;
246
+ const offsetEl = offset(el);
247
+ const useClipPath = right
248
+ ? offsetEl.right < scrollElement.clientWidth
249
+ : Math.round(offsetEl.left) > 0;
250
+
251
+ css(el, {
252
+ clipPath: useClipPath
253
+ ? right
254
+ ? `polygon(0 0,${percent}% 0,${percent}% 100%,0 100%)`
255
+ : `polygon(${100 - percent}% 0,100% 0,100% 100%,${100 - percent}% 100%)`
256
+ : '',
257
+ marginLeft: (((100 - percent) * (right ? 1 : -1)) / 100) * width,
258
+ });
259
+
260
+ return (
261
+ show
262
+ ? Transition.start(
263
+ el,
264
+ {
265
+ clipPath: useClipPath ? `polygon(0 0,100% 0,100% 100%,0 100%)` : '',
266
+ marginLeft: 0,
267
+ },
268
+ duration * (1 - percent / 100),
269
+ transition
270
+ )
271
+ : Transition.start(
272
+ el,
273
+ {
274
+ clipPath: useClipPath
275
+ ? right
276
+ ? `polygon(0 0,0 0,0 100%,0 100%)`
277
+ : `polygon(100% 0,100% 0,100% 100%,100% 100%)`
278
+ : '',
279
+ marginLeft: (right ? 1 : -1) * width,
280
+ },
281
+ duration * (percent / 100),
282
+ transition
283
+ ).then(() => _toggle(el, false))
284
+ ).then(() => {
285
+ css(scrollElement, 'overflowX', '');
286
+ css(el, { clipPath: '', marginLeft: '' });
287
+ });
288
+ };
289
+ }
290
+
210
291
  function toggleAnimation(cmp) {
211
292
  return (el, show) => {
212
293
  Animation.cancel(el);
@@ -5,6 +5,7 @@ import { startsWith, toNodes } from './lang';
5
5
  import { addClass, hasClass, removeClass, removeClasses } from './class';
6
6
 
7
7
  export function transition(element, props, duration = 400, timing = 'linear') {
8
+ duration = Math.round(duration);
8
9
  return Promise.all(
9
10
  toNodes(element).map(
10
11
  (element) =>
@@ -128,7 +128,7 @@ export function scrolledOver(element, startOffset = 0, endOffset = 0) {
128
128
  return clamp((scrollTop - start) / (end - start));
129
129
  }
130
130
 
131
- export function scrollParents(element, overflowRe = /auto|scroll|hidden/, scrollable = false) {
131
+ export function scrollParents(element, overflowRe = /auto|scroll|hidden|clip/, scrollable = false) {
132
132
  const scrollEl = scrollingElement(element);
133
133
 
134
134
  let ancestors = parents(element).reverse();
@@ -3,10 +3,7 @@
3
3
  //
4
4
  // Component: `uk-drop`
5
5
  //
6
- // Modifiers: `uk-drop-top-*`
7
- // `uk-drop-bottom-*`
8
- // `uk-drop-left-*`
9
- // `uk-drop-right-*`
6
+ // Modifiers: `uk-drop-stretch`
10
7
  // `uk-drop-stack`
11
8
  // `uk-drop-grid`
12
9
  //
@@ -53,6 +50,22 @@
53
50
  .uk-drop.uk-open { display: block; }
54
51
 
55
52
 
53
+ /* Stretch modifier
54
+ ========================================================================== */
55
+
56
+ /*
57
+ * 1. Allow scrolling
58
+ */
59
+
60
+ .uk-drop-stretch {
61
+ --uk-position-offset: 0;
62
+ --uk-position-viewport-offset: 0;
63
+ /* 1 */
64
+ overflow-y: auto;
65
+ -webkit-overflow-scrolling: touch;
66
+ }
67
+
68
+
56
69
  /* Grid modifiers
57
70
  ========================================================================== */
58
71
 
@@ -5,10 +5,7 @@
5
5
  //
6
6
  // Adopted: `uk-dropdown-nav`
7
7
  //
8
- // Modifiers: `uk-dropdown-top-*`
9
- // `uk-dropdown-bottom-*`
10
- // `uk-dropdown-left-*`
11
- // `uk-dropdown-right-*`
8
+ // Modifiers: `uk-dropdown-stretch`
12
9
  // `uk-dropdown-stack`
13
10
  // `uk-dropdown-grid`
14
11
  //
@@ -72,6 +69,23 @@
72
69
  .uk-dropdown.uk-open { display: block; }
73
70
 
74
71
 
72
+ /* Stretch modifier
73
+ ========================================================================== */
74
+
75
+ /*
76
+ * 1. Allow scrolling
77
+ */
78
+
79
+ .uk-dropdown-stretch {
80
+ --uk-position-offset: 0;
81
+ --uk-position-viewport-offset: 0;
82
+ /* 1 */
83
+ overflow-y: auto;
84
+ -webkit-overflow-scrolling: touch;
85
+ .hook-dropdown-stretch();
86
+ }
87
+
88
+
75
89
  /* Nav
76
90
  * Adopts `uk-nav`
77
91
  ========================================================================== */
@@ -146,6 +160,7 @@
146
160
  .hook-dropdown-misc();
147
161
 
148
162
  .hook-dropdown() {}
163
+ .hook-dropdown-stretch() {}
149
164
  .hook-dropdown-nav() {}
150
165
  .hook-dropdown-nav-item() {}
151
166
  .hook-dropdown-nav-item-hover() {}
@@ -193,20 +193,20 @@
193
193
  /* Remove
194
194
  ========================================================================== */
195
195
 
196
- .uk-margin-remove { margin: 0 !important; }
197
- .uk-margin-remove-top { margin-top: 0 !important; }
198
- .uk-margin-remove-bottom { margin-bottom: 0 !important; }
199
- .uk-margin-remove-left { margin-left: 0 !important; }
200
- .uk-margin-remove-right { margin-right: 0 !important; }
201
-
202
- .uk-margin-remove-vertical {
203
- margin-top: 0 !important;
204
- margin-bottom: 0 !important;
205
- }
196
+ .uk-margin-remove { margin: 0 !important; }
197
+ .uk-margin-remove-top { margin-top: 0 !important; }
198
+ .uk-margin-remove-bottom { margin-bottom: 0 !important; }
199
+ .uk-margin-remove-left { margin-left: 0 !important; }
200
+ .uk-margin-remove-right { margin-right: 0 !important; }
201
+
202
+ .uk-margin-remove-vertical {
203
+ margin-top: 0 !important;
204
+ margin-bottom: 0 !important;
205
+ }
206
206
 
207
- .uk-margin-remove-adjacent + *,
208
- .uk-margin-remove-first-child > :first-child { margin-top: 0 !important; }
209
- .uk-margin-remove-last-child > :last-child { margin-bottom: 0 !important; }
207
+ .uk-margin-remove-adjacent + *,
208
+ .uk-margin-remove-first-child > :first-child { margin-top: 0 !important; }
209
+ .uk-margin-remove-last-child > :last-child { margin-bottom: 0 !important; }
210
210
 
211
211
  /* Phone landscape and bigger */
212
212
  @media (min-width: @breakpoint-small) {
@@ -241,7 +241,6 @@
241
241
  }
242
242
 
243
243
 
244
-
245
244
  // Hooks
246
245
  // ========================================================================
247
246
 
@@ -282,7 +282,7 @@ ul.uk-nav-sub {
282
282
  * Subtitle
283
283
  */
284
284
 
285
- .uk-nav-primary .uk-nav-subtitle {
285
+ .uk-nav-primary .uk-nav-subtitle {
286
286
  font-size: @nav-primary-subtitle-font-size;
287
287
  .hook-nav-primary-subtitle();
288
288
  }
@@ -65,6 +65,7 @@
65
65
  @navbar-dropdown-padding: 15px;
66
66
  @navbar-dropdown-background: @global-muted-background;
67
67
  @navbar-dropdown-color: @global-color;
68
+ @navbar-dropdown-color-mode: none;
68
69
  @navbar-dropdown-grid-gutter-horizontal: @global-gutter;
69
70
  @navbar-dropdown-grid-gutter-vertical: @navbar-dropdown-grid-gutter-horizontal;
70
71
 
@@ -392,6 +393,10 @@
392
393
  /* Show */
393
394
  .uk-navbar-dropdown.uk-open { display: block; }
394
395
 
396
+
397
+ .uk-navbar-dropdown:extend(.uk-light all) when (@navbar-dropdown-color-mode = light) {}
398
+ .uk-navbar-dropdown:extend(.uk-dark all) when (@navbar-dropdown-color-mode = dark) {}
399
+
395
400
  /*
396
401
  * Grid
397
402
  * Adopts `uk-grid`
@@ -416,6 +421,21 @@
416
421
  .uk-navbar-dropdown-width-4:not(.uk-navbar-dropdown-stack) { width: (@navbar-dropdown-width * 4); }
417
422
  .uk-navbar-dropdown-width-5:not(.uk-navbar-dropdown-stack) { width: (@navbar-dropdown-width * 5); }
418
423
 
424
+ /*
425
+ * Stretch modifier
426
+ * 1. Allow scrolling
427
+ */
428
+
429
+ .uk-navbar-dropdown-stretch {
430
+ --uk-position-offset: 0;
431
+ --uk-position-shift-offset: 0;
432
+ --uk-position-viewport-offset: 0;
433
+ /* 1 */
434
+ overflow-y: auto;
435
+ -webkit-overflow-scrolling: touch;
436
+ .hook-navbar-dropdown-stretch();
437
+ }
438
+
419
439
  /*
420
440
  * Dropbar modifier
421
441
  * 1. Reset dropdown width to prevent to early shifting
@@ -531,24 +551,25 @@
531
551
  .hook-navbar-nav-item-onclick() {}
532
552
  .hook-navbar-nav-item-active() {}
533
553
  .hook-navbar-item() {}
534
- .hook-navbar-toggle(){}
535
- .hook-navbar-toggle-hover(){}
536
- .hook-navbar-toggle-icon(){}
537
- .hook-navbar-toggle-icon-hover(){}
554
+ .hook-navbar-toggle() {}
555
+ .hook-navbar-toggle-hover() {}
556
+ .hook-navbar-toggle-icon() {}
557
+ .hook-navbar-toggle-icon-hover() {}
538
558
  .hook-navbar-subtitle() {}
539
- .hook-navbar-primary(){}
540
- .hook-navbar-transparent(){}
541
- .hook-navbar-sticky(){}
542
- .hook-navbar-dropdown(){}
543
- .hook-navbar-dropdown-dropbar(){}
544
- .hook-navbar-dropdown-nav(){}
559
+ .hook-navbar-primary() {}
560
+ .hook-navbar-transparent() {}
561
+ .hook-navbar-sticky() {}
562
+ .hook-navbar-dropdown() {}
563
+ .hook-navbar-dropdown-stretch() {}
564
+ .hook-navbar-dropdown-dropbar() {}
565
+ .hook-navbar-dropdown-nav() {}
545
566
  .hook-navbar-dropdown-nav-item() {}
546
567
  .hook-navbar-dropdown-nav-item-hover() {}
547
568
  .hook-navbar-dropdown-nav-item-active() {}
548
569
  .hook-navbar-dropdown-nav-subtitle() {}
549
570
  .hook-navbar-dropdown-nav-header() {}
550
571
  .hook-navbar-dropdown-nav-divider() {}
551
- .hook-navbar-dropbar(){}
572
+ .hook-navbar-dropbar() {}
552
573
  .hook-navbar-misc() {}
553
574
 
554
575
 
@@ -218,7 +218,7 @@
218
218
  ========================================================================== */
219
219
 
220
220
  .uk-position-z-index { z-index: 1; }
221
-
221
+ .uk-position-z-index-zero { z-index: 0; }
222
222
  .uk-position-z-index-negative { z-index: -1; }
223
223
 
224
224
 
@@ -55,6 +55,13 @@
55
55
 
56
56
  .uk-sticky.uk-animation-reverse { animation-duration: @sticky-reverse-animation-duration; }
57
57
 
58
+ /*
59
+ * Placeholder
60
+ * Make content clickable for sticky cover and reveal effects
61
+ */
62
+
63
+ .uk-sticky-placeholder { pointer-events: none; }
64
+
58
65
 
59
66
  // Hooks
60
67
  // ========================================================================
@@ -137,7 +137,6 @@
137
137
 
138
138
  /*
139
139
  * Enable scrollbars if content is clipped
140
- * Note: Firefox ignores `padding-bottom` for the scrollable overflow https://bugzilla.mozilla.org/show_bug.cgi?id=748518
141
140
  */
142
141
 
143
142
  .uk-overflow-auto {
@@ -20,6 +20,8 @@
20
20
 
21
21
  @dropdown-box-shadow: 0 5px 12px rgba(0,0,0,0.15);
22
22
 
23
+ @dropdown-stretch-background: @global-muted-background;
24
+
23
25
 
24
26
  // Component
25
27
  // ========================================================================
@@ -27,6 +29,15 @@
27
29
  .hook-dropdown() { box-shadow: @dropdown-box-shadow; }
28
30
 
29
31
 
32
+ // Stretch modifier
33
+ // ========================================================================
34
+
35
+ .hook-dropdown-stretch() {
36
+ box-shadow: none;
37
+ background: @dropdown-stretch-background;
38
+ }
39
+
40
+
30
41
  // Nav
31
42
  // ========================================================================
32
43
 
@@ -29,6 +29,8 @@
29
29
 
30
30
  @navbar-dropdown-box-shadow: 0 5px 12px rgba(0,0,0,0.15);
31
31
 
32
+ @navbar-dropdown-stretch-background: @global-muted-background;
33
+
32
34
  @navbar-dropbar-box-shadow: 0 5px 7px rgba(0, 0, 0, 0.05);
33
35
 
34
36
  @navbar-dropdown-grid-divider-border-width: @global-border-width;
@@ -102,6 +104,11 @@
102
104
 
103
105
  .hook-navbar-dropdown() { box-shadow: @navbar-dropdown-box-shadow; }
104
106
 
107
+ .hook-navbar-dropdown-stretch() {
108
+ box-shadow: none;
109
+ background: @navbar-dropdown-stretch-background;
110
+ }
111
+
105
112
  .hook-navbar-dropdown-dropbar() { box-shadow: none; }
106
113
 
107
114
 
@@ -3,10 +3,7 @@
3
3
  //
4
4
  // Component: `uk-drop`
5
5
  //
6
- // Modifiers: `uk-drop-top-*`
7
- // `uk-drop-bottom-*`
8
- // `uk-drop-left-*`
9
- // `uk-drop-right-*`
6
+ // Modifiers: `uk-drop-stretch`
10
7
  // `uk-drop-stack`
11
8
  // `uk-drop-grid`
12
9
  //
@@ -53,6 +50,22 @@ $drop-width: 300px !default;
53
50
  .uk-drop.uk-open { display: block; }
54
51
 
55
52
 
53
+ /* Stretch modifier
54
+ ========================================================================== */
55
+
56
+ /*
57
+ * 1. Allow scrolling
58
+ */
59
+
60
+ .uk-drop-stretch {
61
+ --uk-position-offset: 0;
62
+ --uk-position-viewport-offset: 0;
63
+ /* 1 */
64
+ overflow-y: auto;
65
+ -webkit-overflow-scrolling: touch;
66
+ }
67
+
68
+
56
69
  /* Grid modifiers
57
70
  ========================================================================== */
58
71
 
@@ -5,10 +5,7 @@
5
5
  //
6
6
  // Adopted: `uk-dropdown-nav`
7
7
  //
8
- // Modifiers: `uk-dropdown-top-*`
9
- // `uk-dropdown-bottom-*`
10
- // `uk-dropdown-left-*`
11
- // `uk-dropdown-right-*`
8
+ // Modifiers: `uk-dropdown-stretch`
12
9
  // `uk-dropdown-stack`
13
10
  // `uk-dropdown-grid`
14
11
  //
@@ -72,6 +69,23 @@ $dropdown-nav-sublist-item-hover-color: $global-color !default;
72
69
  .uk-dropdown.uk-open { display: block; }
73
70
 
74
71
 
72
+ /* Stretch modifier
73
+ ========================================================================== */
74
+
75
+ /*
76
+ * 1. Allow scrolling
77
+ */
78
+
79
+ .uk-dropdown-stretch {
80
+ --uk-position-offset: 0;
81
+ --uk-position-viewport-offset: 0;
82
+ /* 1 */
83
+ overflow-y: auto;
84
+ -webkit-overflow-scrolling: touch;
85
+ @if(mixin-exists(hook-dropdown-stretch)) {@include hook-dropdown-stretch();}
86
+ }
87
+
88
+
75
89
  /* Nav
76
90
  * Adopts `uk-nav`
77
91
  ========================================================================== */
@@ -146,6 +160,7 @@ $dropdown-nav-sublist-item-hover-color: $global-color !default;
146
160
  @if(mixin-exists(hook-dropdown-misc)) {@include hook-dropdown-misc();}
147
161
 
148
162
  // @mixin hook-dropdown(){}
163
+ // @mixin hook-dropdown-stretch(){}
149
164
  // @mixin hook-dropdown-nav(){}
150
165
  // @mixin hook-dropdown-nav-item(){}
151
166
  // @mixin hook-dropdown-nav-item-hover(){}
@@ -193,20 +193,20 @@ $margin-xlarge-margin-l: $global-xlarge-margin !d
193
193
  /* Remove
194
194
  ========================================================================== */
195
195
 
196
- .uk-margin-remove { margin: 0 !important; }
197
- .uk-margin-remove-top { margin-top: 0 !important; }
198
- .uk-margin-remove-bottom { margin-bottom: 0 !important; }
199
- .uk-margin-remove-left { margin-left: 0 !important; }
200
- .uk-margin-remove-right { margin-right: 0 !important; }
201
-
202
- .uk-margin-remove-vertical {
203
- margin-top: 0 !important;
204
- margin-bottom: 0 !important;
205
- }
196
+ .uk-margin-remove { margin: 0 !important; }
197
+ .uk-margin-remove-top { margin-top: 0 !important; }
198
+ .uk-margin-remove-bottom { margin-bottom: 0 !important; }
199
+ .uk-margin-remove-left { margin-left: 0 !important; }
200
+ .uk-margin-remove-right { margin-right: 0 !important; }
201
+
202
+ .uk-margin-remove-vertical {
203
+ margin-top: 0 !important;
204
+ margin-bottom: 0 !important;
205
+ }
206
206
 
207
- .uk-margin-remove-adjacent + *,
208
- .uk-margin-remove-first-child > :first-child { margin-top: 0 !important; }
209
- .uk-margin-remove-last-child > :last-child { margin-bottom: 0 !important; }
207
+ .uk-margin-remove-adjacent + *,
208
+ .uk-margin-remove-first-child > :first-child { margin-top: 0 !important; }
209
+ .uk-margin-remove-last-child > :last-child { margin-bottom: 0 !important; }
210
210
 
211
211
  /* Phone landscape and bigger */
212
212
  @media (min-width: $breakpoint-small) {
@@ -241,7 +241,6 @@ $margin-xlarge-margin-l: $global-xlarge-margin !d
241
241
  }
242
242
 
243
243
 
244
-
245
244
  // Hooks
246
245
  // ========================================================================
247
246
 
@@ -282,7 +282,7 @@ ul.uk-nav-sub {
282
282
  * Subtitle
283
283
  */
284
284
 
285
- .uk-nav-primary .uk-nav-subtitle {
285
+ .uk-nav-primary .uk-nav-subtitle {
286
286
  font-size: $nav-primary-subtitle-font-size;
287
287
  @if(mixin-exists(hook-nav-primary-subtitle)) {@include hook-nav-primary-subtitle();}
288
288
  }