uikit 3.11.2-dev.19d26d0f9 → 3.11.2-dev.244aa5c8c

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 (47) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  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 +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  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 +1 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  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 +1 -1
  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 +1 -1
  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 +39 -13
  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 +39 -13
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/drop.js +1 -1
  44. package/src/js/core/navbar.js +6 -2
  45. package/src/js/core/sticky.js +29 -10
  46. package/tests/sticky-parallax.html +44 -41
  47. package/tests/sticky.html +20 -3
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.11.2-dev.19d26d0f9",
5
+ "version": "3.11.2-dev.244aa5c8c",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -308,7 +308,7 @@ export default {
308
308
  if (active) {
309
309
 
310
310
  if (delay && active.isDelaying) {
311
- this.showTimer = setTimeout(this.show, 10);
311
+ this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
312
312
  return;
313
313
  }
314
314
 
@@ -137,7 +137,7 @@ export default {
137
137
 
138
138
  handler({current}) {
139
139
  const active = this.getActive();
140
- if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.tracker.movesTo(active.$el)) {
140
+ if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.isDelaying) {
141
141
  active.hide(false);
142
142
  }
143
143
  }
@@ -301,7 +301,11 @@ export default {
301
301
 
302
302
  const active = this.getActive();
303
303
 
304
- if (matches(this.dropbar, ':hover') && active && active.$el === $el) {
304
+ if (matches(this.dropbar, ':hover')
305
+ && active
306
+ && active.$el === $el
307
+ && !this.toggles.some(el => active.target !== el && matches(el, ':focus'))
308
+ ) {
305
309
  e.preventDefault();
306
310
  }
307
311
  }
@@ -1,12 +1,13 @@
1
1
  import Class from '../mixin/class';
2
2
  import Media from '../mixin/media';
3
- import {$, addClass, after, Animation, assign, clamp, css, dimensions, fastdom, height as getHeight, getScrollingElement, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toggleClass, toPx, trigger, within} from 'uikit-util';
3
+ import {$, addClass, after, Animation, clamp, css, dimensions, fastdom, height as getHeight, getScrollingElement, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toggleClass, toPx, trigger, within} from 'uikit-util';
4
4
 
5
5
  export default {
6
6
 
7
7
  mixins: [Class, Media],
8
8
 
9
9
  props: {
10
+ position: String,
10
11
  top: null,
11
12
  bottom: Boolean,
12
13
  offset: String,
@@ -22,6 +23,7 @@ export default {
22
23
  },
23
24
 
24
25
  data: {
26
+ position: 'top',
25
27
  top: 0,
26
28
  bottom: false,
27
29
  offset: 0,
@@ -38,7 +40,18 @@ export default {
38
40
 
39
41
  computed: {
40
42
 
43
+ position({position}, $el) {
44
+ return position === 'auto'
45
+ ? (this.isFixed ? this.placeholder : $el).offsetHeight > getHeight(window)
46
+ ? 'bottom'
47
+ : 'top'
48
+ : position;
49
+ },
50
+
41
51
  offset({offset}, $el) {
52
+ if (this.position === 'bottom') {
53
+ offset += '+100vh-100%';
54
+ }
42
55
  return toPx(offset, 'height', $el);
43
56
  },
44
57
 
@@ -130,7 +143,7 @@ export default {
130
143
 
131
144
  {
132
145
 
133
- read({height}, types) {
146
+ read({height, margin}, types) {
134
147
 
135
148
  this.inactive = !this.matchMedia || !isVisible(this.$el);
136
149
 
@@ -138,13 +151,19 @@ export default {
138
151
  return false;
139
152
  }
140
153
 
141
- if (this.isActive && types.has('resize')) {
154
+ const hide = this.isActive && types.has('resize');
155
+ if (hide) {
142
156
  this.hide();
157
+ }
158
+
159
+ if (!this.isActive) {
143
160
  height = this.$el.offsetHeight;
144
- this.show();
161
+ margin = css(this.$el, 'margin');
145
162
  }
146
163
 
147
- height = this.isActive ? height : this.$el.offsetHeight;
164
+ if (hide) {
165
+ this.show();
166
+ }
148
167
 
149
168
  const overflow = Math.max(0, height + this.offset - getHeight(window));
150
169
 
@@ -167,17 +186,17 @@ export default {
167
186
  topOffset,
168
187
  offsetParentTop,
169
188
  height,
189
+ margin,
170
190
  width: dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).width,
171
- top: offsetPosition(this.placeholder)[0],
172
- margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])
191
+ top: offsetPosition(this.placeholder)[0]
173
192
  };
174
193
  },
175
194
 
176
- write({height, margins}) {
195
+ write({height, margin}) {
177
196
 
178
197
  const {placeholder} = this;
179
198
 
180
- css(placeholder, assign({height}, margins));
199
+ css(placeholder, {height, margin});
181
200
 
182
201
  if (!within(placeholder, document)) {
183
202
  after(this.$el, placeholder);
@@ -302,7 +321,7 @@ export default {
302
321
 
303
322
  const {width, scroll = 0, overflow, overflowScroll = 0, start, end, topOffset, height, offsetParentTop} = this._data;
304
323
  const active = start !== 0 || scroll > start;
305
- let top = Math.max(0, this.offset);
324
+ let top = this.offset;
306
325
  let position = 'fixed';
307
326
 
308
327
  if (scroll > end) {
@@ -8,9 +8,9 @@
8
8
  <script src="js/test.js"></script>
9
9
  </head>
10
10
 
11
- <body style="padding-bottom: 1100px;">
11
+ <body style="padding-bottom: 100vh;">
12
12
 
13
- <div class="uk-section uk-section-primary uk-position-z-index-negative uk-flex uk-flex-center uk-flex-middle uk-text-center" uk-sticky="bottom: +* +*" uk-height-viewport>
13
+ <div class="uk-section uk-section-primary uk-position-z-index-negative uk-flex uk-flex-center uk-flex-middle uk-text-center" uk-sticky="position: auto; bottom: +* +*" uk-height-viewport>
14
14
  <div class="uk-container">
15
15
 
16
16
  <h1 class="uk-heading-2xlarge">Sticky Section</h1>
@@ -21,21 +21,20 @@
21
21
  <div class="uk-section uk-section-default">
22
22
  <div class="uk-container">
23
23
 
24
- <div id="js-sticky-parallax-container" class="uk-position-relative uk-background-muted uk-text-center" style="height: 200vh">
25
- <div uk-sticky="bottom: #js-sticky-parallax-container; offset: 20vh">
24
+ <div id="js-sticky-parallax-container" class="uk-position-relative uk-background-muted uk-text-center" style="height: 300vh">
25
+ <div class="uk-flex uk-flex-center uk-flex-middle" style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-container">
26
+ <div>
26
27
 
27
- <div class="uk-position-center">
28
- <div class="uk-flex">
29
- <div>
30
- <h1 class="uk-heading-2xlarge" uk-parallax="target: #js-sticky-parallax-container; x: 0,-250,-250,0; easing: -1; start: 60vh; end: 100vh;">Sticky</h1>
31
- </div>
32
- <div>
33
- <h1 class="uk-heading-2xlarge" uk-parallax="target: #js-sticky-parallax-container; x: 0,250,250,0; easing: -1; start: 60vh; end: 100vh;">Parallax</h1>
34
- </div>
28
+ <img class="uk-position-relative uk-position-z-index" src="images/size-v.jpg" alt="" width="400" height="800" style="max-width: 50vw" uk-parallax="target: #js-sticky-parallax-container; y: 0,-250; easing: -1; start: 100vh; end: 100vh;">
29
+
30
+ <div style="margin-top: -200px">
31
+ <h1 class="uk-heading-2xlarge">
32
+ <span class="uk-display-inline-block" uk-parallax="target: #js-sticky-parallax-container; x: 0,-15vw,-7vw,0; easing: -1; start: 60vh; end: 100vh;">Sticky</span>
33
+ <br><span class="uk-display-inline-block" uk-parallax="target: #js-sticky-parallax-container; x: 0,10vw,5vw,0; easing: -1; start: 60vh; end: 100vh;">Parallax</span>
34
+ </h1>
35
35
  </div>
36
- </div>
37
36
 
38
- <img class="uk-position-relative uk-position-z-index" src="images/size-v.jpg" alt="" width="400" height="800">
37
+ </div>
39
38
 
40
39
  </div>
41
40
  </div>
@@ -117,7 +116,7 @@
117
116
 
118
117
  <div class="uk-section uk-section-default">
119
118
 
120
- <div id="js-sticky-parallax-viewport" class="uk-child-width-1-3 uk-text-center" uk-grid>
119
+ <div id="js-sticky-parallax-viewport" class="uk-child-width-1-2 uk-child-width-1-3@s uk-text-center" uk-grid>
121
120
  <div>
122
121
 
123
122
  <img class="uk-margin-large" src="images/photo.jpg" alt="" width="1800" height="1200">
@@ -125,13 +124,15 @@
125
124
  <img class="uk-margin-large" src="images/photo2.jpg" alt="" width="1800" height="1200">
126
125
  <img class="uk-margin-large" src="images/photo.jpg" alt="" width="1800" height="1200">
127
126
  <img class="uk-margin-large" src="images/photo3.jpg" alt="" width="1800" height="1200">
127
+ <img class="uk-margin-large" src="images/photo2.jpg" alt="" width="1800" height="1200">
128
+ <img class="uk-margin-large" src="images/photo.jpg" alt="" width="1800" height="1200">
128
129
 
129
130
  </div>
130
131
  <div>
131
132
 
132
- <div class="uk-tile uk-tile-muted uk-text-center" style="height: 100vh" uk-sticky="bottom: #js-sticky-parallax-viewport">
133
+ <div class="uk-background-muted uk-text-center" style="height: 100vh" uk-sticky="bottom: #js-sticky-parallax-viewport">
133
134
 
134
- <div uk-parallax="target: #js-sticky-parallax-viewport; start: 100vh; end: 100vh; y: 0, 35vh; easing: 0">
135
+ <div uk-parallax="target: #js-sticky-parallax-viewport; start: 100vh; end: 100vh; y: 10vh, 80vh; easing: 0">
135
136
 
136
137
  <h1 class="uk-margin-remove">Sticky Parallax Viewport</h1>
137
138
 
@@ -140,13 +141,15 @@
140
141
  </div>
141
142
 
142
143
  </div>
143
- <div>
144
+ <div class="uk-visible@s">
144
145
 
145
146
  <img class="uk-margin-large" src="images/photo2.jpg" alt="" width="1800" height="1200">
146
147
  <img class="uk-margin-large" src="images/photo.jpg" alt="" width="1800" height="1200">
147
148
  <img class="uk-margin-large" src="images/photo3.jpg" alt="" width="1800" height="1200">
148
149
  <img class="uk-margin-large" src="images/photo2.jpg" alt="" width="1800" height="1200">
149
150
  <img class="uk-margin-large" src="images/photo.jpg" alt="" width="1800" height="1200">
151
+ <img class="uk-margin-large" src="images/photo3.jpg" alt="" width="1800" height="1200">
152
+ <img class="uk-margin-large" src="images/photo2.jpg" alt="" width="1800" height="1200">
150
153
 
151
154
  </div>
152
155
  </div>
@@ -155,10 +158,10 @@
155
158
 
156
159
  <div class="uk-section uk-section-default">
157
160
 
158
- <div id="js-sticky-parallax-images" class="uk-child-width-1-3" style="height: 250vh" uk-grid>
159
- <div class="uk-background-muted uk-width-expand">
161
+ <div id="js-sticky-parallax-images" style="height: 250vh" uk-grid>
162
+ <div class="uk-width-expand">
160
163
 
161
- <div style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-images">
164
+ <div class="uk-background-muted" style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-images">
162
165
  <div uk-parallax="target: #js-sticky-parallax-images; y: 55vh, 45vh;">
163
166
  <img class="uk-position-center-left" src="images/photo.jpg" alt="" width="1800" height="1200">
164
167
  <img class="uk-position-center-left" src="images/photo2.jpg" alt="" width="1800" height="1200" uk-parallax="target: #js-sticky-parallax-images; start: 125vh; end: 100% + 100vh - 135vh; opacity: 0,1">
@@ -167,12 +170,12 @@
167
170
  </div>
168
171
 
169
172
  </div>
170
- <div class="uk-width-small">
171
- <div class="uk-position-relative uk-background-muted" style="height: 75vh"><div class="uk-position-bottom-center">75vh</div></div>
172
- <div class="uk-position-relative uk-background-primary uk-light" style="height: 50vh"><div class="uk-position-bottom-center">125vh</div></div>
173
- <div class="uk-position-relative uk-background-secondary uk-light" style="height: 50vh"><div class="uk-position-bottom-center">175vh</div></div>
174
- <div class="uk-position-relative uk-background-muted" style="height: 50vh"><div class="uk-position-bottom-center">225vh</div></div>
175
- <div class="uk-position-relative uk-background-primary uk-light" style="height: 25vh"><div class="uk-position-bottom-center">250vh</div></div>
173
+ <div class="uk-width-auto uk-text-small">
174
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-muted" style="height: 75vh">75vh</div>
175
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-primary uk-light" style="height: 50vh">125vh</div>
176
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-secondary uk-light" style="height: 50vh">175vh</div>
177
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-muted" style="height: 50vh">225vh</div>
178
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-primary uk-light" style="height: 25vh">250vh</div>
176
179
  </div>
177
180
  <div class="uk-width-expand">
178
181
 
@@ -183,7 +186,7 @@
183
186
 
184
187
  <h1>Sticky Parallax Images 1</h1>
185
188
 
186
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
189
+ <p class="uk-visible@s">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
187
190
 
188
191
  </div>
189
192
  </div>
@@ -193,7 +196,7 @@
193
196
 
194
197
  <h1>Sticky Parallax Images 2</h1>
195
198
 
196
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
199
+ <p class="uk-visible@s">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
197
200
 
198
201
  </div>
199
202
  </div>
@@ -203,7 +206,7 @@
203
206
 
204
207
  <h1>Sticky Parallax Images 3</h1>
205
208
 
206
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
209
+ <p class="uk-visible@s">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
207
210
 
208
211
  </div>
209
212
  </div>
@@ -215,10 +218,10 @@
215
218
 
216
219
  <div class="uk-section uk-section-default">
217
220
 
218
- <div id="js-sticky-parallax-images-all" class="uk-child-width-1-3" style="height: 250vh" uk-grid>
219
- <div class="uk-background-muted uk-width-expand">
221
+ <div id="js-sticky-parallax-images-all" style="height: 250vh" uk-grid>
222
+ <div class="uk-width-expand">
220
223
 
221
- <div style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-images-all">
224
+ <div class="uk-background-muted" style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-images-all">
222
225
  <div uk-parallax="target: #js-sticky-parallax-images-all; y: 55vh, 45vh;">
223
226
  <img class="uk-position-center-left" src="images/photo.jpg" alt="" width="1800" height="1200">
224
227
  <img class="uk-position-center-left" src="images/photo2.jpg" alt="" width="1800" height="1200" uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 160vh; opacity: 0,1">
@@ -227,11 +230,11 @@
227
230
  </div>
228
231
 
229
232
  </div>
230
- <div class="uk-width-small">
231
- <div class="uk-position-relative uk-background-muted" style="height: 100vh"><div class="uk-position-bottom-center">100vh</div></div>
232
- <div class="uk-position-relative uk-background-primary uk-light" style="height: 50vh"><div class="uk-position-bottom-center">150vh</div></div>
233
- <div class="uk-position-relative uk-background-secondary uk-light" style="height: 50vh"><div class="uk-position-bottom-center">200vh</div></div>
234
- <div class="uk-position-relative uk-background-muted" style="height: 50vh"><div class="uk-position-bottom-center">250vh</div></div>
233
+ <div class="uk-width-auto uk-text-small">
234
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-muted" style="height: 100vh">100vh</div>
235
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-primary uk-light" style="height: 50vh">150vh</div>
236
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-secondary uk-light" style="height: 50vh">200vh</div>
237
+ <div class="uk-flex uk-flex-center uk-flex-bottom uk-background-muted" style="height: 50vh">250vh</div>
235
238
  </div>
236
239
  <div class="uk-width-expand">
237
240
 
@@ -242,7 +245,7 @@
242
245
 
243
246
  <h1>Sticky Parallax Images All 1</h1>
244
247
 
245
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
248
+ <p class="uk-visible@s">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
246
249
 
247
250
  </div>
248
251
  </div>
@@ -251,7 +254,7 @@
251
254
 
252
255
  <h1>Sticky Parallax Images All 2</h1>
253
256
 
254
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
257
+ <p class="uk-visible@s">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
255
258
 
256
259
  </div>
257
260
  </div>
@@ -259,7 +262,7 @@
259
262
 
260
263
  <h1>Sticky Parallax Images All 3</h1>
261
264
 
262
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
265
+ <p class="uk-visible@s">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
263
266
 
264
267
  </div>
265
268
  </div>
package/tests/sticky.html CHANGED
@@ -57,14 +57,25 @@
57
57
  </div>
58
58
 
59
59
  <p id="hash" class="uk-margin-large">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
60
+
61
+ <div class="viewport uk-margin">
62
+ <div class="uk-grid uk-child-width-1-6" uk-height-viewport>
63
+ <div>
64
+
65
+ <div class="uk-card uk-card-primary uk-card-body" uk-sticky="position: bottom; bottom: !.viewport">Sticky bottom</div>
66
+
67
+ </div>
68
+ </div>
69
+ </div>
70
+
60
71
  </div>
61
72
  <div class="uk-width-1-6">
62
73
  <div class="viewport" style="min-height: 200vh;">
63
74
  <div>
64
- <div class="uk-card uk-card-primary uk-card-body" style="height: 120vh" uk-sticky="bottom: !.viewport">
75
+ <div class="uk-card uk-card-primary uk-card-body" uk-sticky="bottom: !.viewport">
65
76
  <p>Oversized Content</p>
66
77
 
67
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
78
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>
68
79
  </div>
69
80
  </div>
70
81
  </div>
@@ -84,6 +95,12 @@
84
95
  </tr>
85
96
  </thead>
86
97
  <tbody>
98
+ <tr>
99
+ <td><code>position</code></td>
100
+ <td>`top`|`bottom`|`auto`</td>
101
+ <td>`top`</td>
102
+ <td>The position the element should be stuck to. With position `auto` the element sticks to the top of the viewport if it's smaller than the viewport, otherwise it sticks to the top.</td>
103
+ </tr>
87
104
  <tr>
88
105
  <td><code>top</code></td>
89
106
  <td>Number|Viewport Height|CSS Selector</td>
@@ -100,7 +117,7 @@
100
117
  <td><code>offset</code></td>
101
118
  <td>String</td>
102
119
  <td>0</td>
103
- <td>The offset the Sticky should be fixed to.</td>
120
+ <td>The offset the Sticky should be fixed to. It supports basic mathematics operands + and -. (e.g. 50vh + 50%)</td>
104
121
  </tr>
105
122
  <tr>
106
123
  <td><code>animation</code></td>