uikit 3.11.2-dev.92f357b93 → 3.11.2-dev.946d2efea

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 (81) hide show
  1. package/CHANGELOG.md +10 -3
  2. package/dist/css/uikit-core-rtl.css +24 -11
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +24 -11
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +24 -11
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +24 -11
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +3 -3
  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 +5 -15
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +5 -15
  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 +9 -10
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +9 -10
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +59 -78
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +9 -10
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +23 -45
  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 +2 -2
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +2 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +427 -312
  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 +485 -410
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/hooks.js +2 -2
  44. package/src/js/api/state.js +173 -140
  45. package/src/js/components/countdown.js +2 -2
  46. package/src/js/components/internal/slider-preload.js +4 -32
  47. package/src/js/components/slider.js +39 -42
  48. package/src/js/components/upload.js +2 -1
  49. package/src/js/core/accordion.js +6 -1
  50. package/src/js/core/core.js +2 -75
  51. package/src/js/core/cover.js +5 -1
  52. package/src/js/core/drop.js +3 -1
  53. package/src/js/core/form-custom.js +2 -2
  54. package/src/js/core/height-viewport.js +3 -0
  55. package/src/js/core/icon.js +13 -6
  56. package/src/js/core/img.js +19 -25
  57. package/src/js/core/offcanvas.js +2 -1
  58. package/src/js/core/sticky.js +50 -56
  59. package/src/js/core/switcher.js +11 -3
  60. package/src/js/core/toggle.js +4 -2
  61. package/src/js/core/video.js +13 -1
  62. package/src/js/mixin/lazyload.js +20 -0
  63. package/src/js/mixin/parallax.js +9 -10
  64. package/src/js/mixin/slider.js +0 -6
  65. package/src/js/mixin/slideshow.js +0 -4
  66. package/src/js/mixin/swipe.js +72 -0
  67. package/src/js/mixin/togglable.js +1 -1
  68. package/src/js/util/ajax.js +6 -2
  69. package/src/js/util/dimensions.js +4 -4
  70. package/src/js/util/dom.js +16 -7
  71. package/src/js/util/index.js +1 -0
  72. package/src/js/util/observer.js +36 -0
  73. package/src/less/components/form-range.less +4 -6
  74. package/src/less/components/height.less +3 -0
  75. package/src/less/components/utility.less +6 -3
  76. package/src/scss/components/form-range.scss +4 -6
  77. package/src/scss/components/height.scss +3 -0
  78. package/src/scss/components/utility.scss +6 -3
  79. package/tests/parallax.html +5 -5
  80. package/tests/sticky-parallax.html +10 -10
  81. package/tests/utility.html +17 -0
@@ -57,7 +57,7 @@ export default {
57
57
  },
58
58
 
59
59
  events: {
60
- bgimageload() {
60
+ load() {
61
61
  this.$emit();
62
62
  },
63
63
  },
@@ -68,13 +68,11 @@ export default {
68
68
  },
69
69
 
70
70
  getCss(percent) {
71
- return keys(this.props).reduce(
72
- (css, prop) => {
73
- this.props[prop](css, percent);
74
- return css;
75
- },
76
- { transform: '', filter: '' }
77
- );
71
+ const css = { transform: '', filter: '' };
72
+ for (const prop in this.props) {
73
+ this.props[prop](css, percent);
74
+ }
75
+ return css;
78
76
  },
79
77
  },
80
78
  };
@@ -257,8 +255,9 @@ function getBackgroundImageDimensions(el) {
257
255
  if (!image.naturalWidth) {
258
256
  image.onload = () => {
259
257
  dimensions[src] = toDimensions(image);
260
- trigger(el, 'bgimageload');
258
+ trigger(el, 'load');
261
259
  };
260
+ return toDimensions(image);
262
261
  }
263
262
  }
264
263
 
@@ -328,7 +327,7 @@ function getValue(stops, percent) {
328
327
  return isNumber(start) ? start + Math.abs(start - end) * p * (start < end ? 1 : -1) : +end;
329
328
  }
330
329
 
331
- const unitRe = /^[\d-]+([^\s]+)/;
330
+ const unitRe = /^-?\d+([^\s]*)/;
332
331
  function getUnit(stops, defaultUnit) {
333
332
  for (const stop of stops) {
334
333
  const match = stop.match?.(unitRe);
@@ -82,12 +82,6 @@ export default {
82
82
  },
83
83
  },
84
84
 
85
- events: {
86
- itemshown() {
87
- this.$update(this.list);
88
- },
89
- },
90
-
91
85
  methods: {
92
86
  show(index, force = false) {
93
87
  if (this.dragging || !this.length) {
@@ -28,10 +28,6 @@ export default {
28
28
  },
29
29
 
30
30
  events: {
31
- 'itemshow itemhide itemshown itemhidden'({ target }) {
32
- this.$update(target);
33
- },
34
-
35
31
  beforeitemshow({ target }) {
36
32
  addClass(target, this.clsActive);
37
33
  },
@@ -0,0 +1,72 @@
1
+ import {
2
+ getEventPos,
3
+ isTouch,
4
+ once,
5
+ parent,
6
+ pointerCancel,
7
+ pointerDown,
8
+ pointerUp,
9
+ trigger,
10
+ } from 'uikit-util';
11
+ import { registerEvent } from '../api/state';
12
+
13
+ export default {
14
+ props: {
15
+ swiping: Boolean,
16
+ },
17
+
18
+ data: {
19
+ swiping: true,
20
+ },
21
+
22
+ computed: {
23
+ swipeTarget(props, $el) {
24
+ return $el;
25
+ },
26
+ },
27
+
28
+ connected() {
29
+ if (!this.swiping) {
30
+ return;
31
+ }
32
+
33
+ registerEvent(this, {
34
+ el: this.swipeTarget,
35
+ name: pointerDown,
36
+ passive: true,
37
+ handler(e) {
38
+ if (!isTouch(e)) {
39
+ return;
40
+ }
41
+
42
+ // Handle Swipe Gesture
43
+ const pos = getEventPos(e);
44
+ const target = 'tagName' in e.target ? e.target : parent(e.target);
45
+ once(document, `${pointerUp} ${pointerCancel} scroll`, (e) => {
46
+ const { x, y } = getEventPos(e);
47
+
48
+ // swipe
49
+ if (
50
+ (e.type !== 'scroll' && target && x && Math.abs(pos.x - x) > 100) ||
51
+ (y && Math.abs(pos.y - y) > 100)
52
+ ) {
53
+ setTimeout(() => {
54
+ trigger(target, 'swipe');
55
+ trigger(target, `swipe${swipeDirection(pos.x, pos.y, x, y)}`);
56
+ });
57
+ }
58
+ });
59
+ },
60
+ });
61
+ },
62
+ };
63
+
64
+ function swipeDirection(x1, y1, x2, y2) {
65
+ return Math.abs(x1 - x2) >= Math.abs(y1 - y2)
66
+ ? x1 - x2 > 0
67
+ ? 'Left'
68
+ : 'Right'
69
+ : y1 - y2 > 0
70
+ ? 'Up'
71
+ : 'Down';
72
+ }
@@ -150,7 +150,7 @@ export default {
150
150
  export function toggleHeight({ isToggled, duration, initProps, hideProps, transition, _toggle }) {
151
151
  return (el, show) => {
152
152
  const inProgress = Transition.inProgress(el);
153
- const inner = el.hasChildNodes
153
+ const inner = el.hasChildNodes()
154
154
  ? toFloat(css(el.firstElementChild, 'marginTop')) +
155
155
  toFloat(css(el.lastElementChild, 'marginBottom'))
156
156
  : 0;
@@ -60,8 +60,12 @@ export function getImage(src, srcset, sizes) {
60
60
  return new Promise((resolve, reject) => {
61
61
  const img = new Image();
62
62
 
63
- img.onerror = (e) => reject(e);
64
- img.onload = () => resolve(img);
63
+ img.onerror = (e) => {
64
+ reject(e);
65
+ };
66
+ img.onload = () => {
67
+ resolve(img);
68
+ };
65
69
 
66
70
  sizes && (img.sizes = sizes);
67
71
  srcset && (img.srcset = srcset);
@@ -37,8 +37,8 @@ export function offset(element, coordinates) {
37
37
  const currentOffset = dimensions(element);
38
38
 
39
39
  if (element) {
40
- const { pageYOffset, pageXOffset } = toWindow(element);
41
- const offsetBy = { height: pageYOffset, width: pageXOffset };
40
+ const { scrollY, scrollX } = toWindow(element);
41
+ const offsetBy = { height: scrollY, width: scrollX };
42
42
 
43
43
  for (const dir in dirs) {
44
44
  for (const i in dirs[dir]) {
@@ -104,8 +104,8 @@ export function offsetPosition(element) {
104
104
 
105
105
  if (css(element, 'position') === 'fixed') {
106
106
  const win = toWindow(element);
107
- offset[0] += win.pageYOffset;
108
- offset[1] += win.pageXOffset;
107
+ offset[0] += win.scrollY;
108
+ offset[1] += win.scrollX;
109
109
  return offset;
110
110
  }
111
111
  } while ((element = element.offsetParent));
@@ -59,7 +59,7 @@ export function wrapAll(element, structure) {
59
59
  export function wrapInner(element, structure) {
60
60
  return toNodes(
61
61
  toNodes(element).map((element) =>
62
- element.hasChildNodes
62
+ element.hasChildNodes()
63
63
  ? wrapAll(toNodes(element.childNodes), structure)
64
64
  : append(element, structure)
65
65
  )
@@ -73,14 +73,23 @@ export function unwrap(element) {
73
73
  .forEach((parent) => parent.replaceWith(...parent.childNodes));
74
74
  }
75
75
 
76
+ const fragmentRe = /^\s*<(\w+|!)[^>]*>/;
77
+ const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
78
+
76
79
  export function fragment(html) {
77
- const template = document.createElement('template');
78
- template.innerHTML = html.trim();
79
- const nodes = toNodes(template.content.childNodes);
80
- for (const node of nodes) {
81
- document.adoptNode(node);
80
+ const matches = singleTagRe.exec(html);
81
+ if (matches) {
82
+ return document.createElement(matches[1]);
83
+ }
84
+
85
+ const container = document.createElement('div');
86
+ if (fragmentRe.test(html)) {
87
+ container.insertAdjacentHTML('beforeend', html.trim());
88
+ } else {
89
+ container.textContent = html;
82
90
  }
83
- return unwrapSingle(nodes);
91
+
92
+ return unwrapSingle(container.childNodes);
84
93
  }
85
94
 
86
95
  function unwrapSingle(nodes) {
@@ -10,6 +10,7 @@ export * from './fastdom';
10
10
  export * from './filter';
11
11
  export * from './lang';
12
12
  export * from './mouse';
13
+ export * from './observer';
13
14
  export * from './options';
14
15
  export * from './player';
15
16
  export * from './position';
@@ -0,0 +1,36 @@
1
+ import { toNodes } from './lang';
2
+
3
+ // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
4
+ export const hasIntersectionObserver =
5
+ window.IntersectionObserver && 'isIntersecting' in IntersectionObserverEntry.prototype;
6
+ export function observeIntersection(targets, cb, options, intersecting = true) {
7
+ if (!hasIntersectionObserver) {
8
+ return;
9
+ }
10
+
11
+ const observer = new IntersectionObserver((entries, observer) => {
12
+ if (!intersecting || entries.some((entry) => entry.isIntersecting)) {
13
+ cb(entries, observer);
14
+ }
15
+ }, options);
16
+ for (const el of toNodes(targets)) {
17
+ observer.observe(el);
18
+ }
19
+ return observer;
20
+ }
21
+
22
+ const hasResizeObserver = window.ResizeObserver;
23
+ export function observeResize(targets, cb, options = { box: 'border-box' }) {
24
+ if (!hasResizeObserver) {
25
+ return;
26
+ }
27
+
28
+ const observer = new ResizeObserver((entries, observer) => {
29
+ cb(entries, observer);
30
+ });
31
+ for (const el of toNodes(targets)) {
32
+ observer.observe(el, options);
33
+ }
34
+
35
+ return observer;
36
+ }
@@ -65,22 +65,18 @@
65
65
 
66
66
  /*
67
67
  * Track
68
- * 1. Center thumb vertically in Webkit
69
- * 2. Safari doesn't have a focus state. Using active instead.
68
+ * 1. Safari doesn't have a focus state. Using active instead.
70
69
  */
71
70
 
72
71
  /* Webkit */
73
72
  .uk-range::-webkit-slider-runnable-track {
74
73
  height: @form-range-track-height;
75
74
  background: @form-range-track-background;
76
- /* 1 */
77
- display: flex;
78
- align-items: center;
79
75
  .hook-form-range-track();
80
76
  }
81
77
 
82
78
  .uk-range:focus::-webkit-slider-runnable-track,
83
- /* 2 */
79
+ /* 1 */
84
80
  .uk-range:active::-webkit-slider-runnable-track {
85
81
  background: @form-range-track-focus-background;
86
82
  .hook-form-range-track-focus();
@@ -108,6 +104,7 @@
108
104
  .uk-range::-webkit-slider-thumb {
109
105
  /* 1 */
110
106
  -webkit-appearance: none;
107
+ margin-top: (floor((@form-range-thumb-height / 2)) * -1);
111
108
  /* 2 */
112
109
  height: @form-range-thumb-height;
113
110
  width: @form-range-thumb-width;
@@ -123,6 +120,7 @@
123
120
  /* 2 */
124
121
  height: @form-range-thumb-height;
125
122
  width: @form-range-thumb-width;
123
+ margin-top: (floor((@form-range-thumb-height / 2)) * -1);
126
124
  border-radius: @form-range-thumb-border-radius;
127
125
  background: @form-range-thumb-background;
128
126
  .hook-form-range-thumb();
@@ -31,6 +31,9 @@
31
31
  */
32
32
 
33
33
  .uk-height-viewport { min-height: 100vh; }
34
+ .uk-height-viewport-2 { min-height: 200vh; }
35
+ .uk-height-viewport-3 { min-height: 300vh; }
36
+ .uk-height-viewport-4 { min-height: 400vh; }
34
37
 
35
38
  /*
36
39
  * Pixel
@@ -10,6 +10,7 @@
10
10
  // `uk-inline-*`
11
11
  // `uk-responsive-*`
12
12
  // `uk-preserve-width`
13
+ // `uk-object-*`
13
14
  // `uk-border-*`
14
15
  // `uk-box-shadow-*`
15
16
  // `uk-box-shadow-bottom`
@@ -254,9 +255,11 @@
254
255
  /* Object
255
256
  ========================================================================== */
256
257
 
257
- .uk-object-fit-none { object-fit: none; }
258
- .uk-object-fit-cover { object-fit: cover; }
259
- .uk-object-fit-contain { object-fit: contain; }
258
+ .uk-object-cover { object-fit: cover; }
259
+ .uk-object-contain { object-fit: contain; }
260
+ .uk-object-fill { object-fit: fill; }
261
+ .uk-object-none { object-fit: none; }
262
+ .uk-object-scale-down { object-fit: scale-down; }
260
263
 
261
264
  /*
262
265
  * Position
@@ -65,22 +65,18 @@ $form-range-thumb-background: $global-color !default;
65
65
 
66
66
  /*
67
67
  * Track
68
- * 1. Center thumb vertically in Webkit
69
- * 2. Safari doesn't have a focus state. Using active instead.
68
+ * 1. Safari doesn't have a focus state. Using active instead.
70
69
  */
71
70
 
72
71
  /* Webkit */
73
72
  .uk-range::-webkit-slider-runnable-track {
74
73
  height: $form-range-track-height;
75
74
  background: $form-range-track-background;
76
- /* 1 */
77
- display: flex;
78
- align-items: center;
79
75
  @if(mixin-exists(hook-form-range-track)) {@include hook-form-range-track();}
80
76
  }
81
77
 
82
78
  .uk-range:focus::-webkit-slider-runnable-track,
83
- /* 2 */
79
+ /* 1 */
84
80
  .uk-range:active::-webkit-slider-runnable-track {
85
81
  background: $form-range-track-focus-background;
86
82
  @if(mixin-exists(hook-form-range-track-focus)) {@include hook-form-range-track-focus();}
@@ -108,6 +104,7 @@ $form-range-thumb-background: $global-color !default;
108
104
  .uk-range::-webkit-slider-thumb {
109
105
  /* 1 */
110
106
  -webkit-appearance: none;
107
+ margin-top: (floor(($form-range-thumb-height * 0.5)) * -1);
111
108
  /* 2 */
112
109
  height: $form-range-thumb-height;
113
110
  width: $form-range-thumb-width;
@@ -123,6 +120,7 @@ $form-range-thumb-background: $global-color !default;
123
120
  /* 2 */
124
121
  height: $form-range-thumb-height;
125
122
  width: $form-range-thumb-width;
123
+ margin-top: (floor(($form-range-thumb-height * 0.5)) * -1);
126
124
  border-radius: $form-range-thumb-border-radius;
127
125
  background: $form-range-thumb-background;
128
126
  @if(mixin-exists(hook-form-range-thumb)) {@include hook-form-range-thumb();}
@@ -31,6 +31,9 @@ $height-large-height: 450px !default;
31
31
  */
32
32
 
33
33
  .uk-height-viewport { min-height: 100vh; }
34
+ .uk-height-viewport-2 { min-height: 200vh; }
35
+ .uk-height-viewport-3 { min-height: 300vh; }
36
+ .uk-height-viewport-4 { min-height: 400vh; }
34
37
 
35
38
  /*
36
39
  * Pixel
@@ -10,6 +10,7 @@
10
10
  // `uk-inline-*`
11
11
  // `uk-responsive-*`
12
12
  // `uk-preserve-width`
13
+ // `uk-object-*`
13
14
  // `uk-border-*`
14
15
  // `uk-box-shadow-*`
15
16
  // `uk-box-shadow-bottom`
@@ -254,9 +255,11 @@ $dragover-box-shadow: 0 0 20px rgba(100,100,100,0.3)
254
255
  /* Object
255
256
  ========================================================================== */
256
257
 
257
- .uk-object-fit-none { object-fit: none; }
258
- .uk-object-fit-cover { object-fit: cover; }
259
- .uk-object-fit-contain { object-fit: contain; }
258
+ .uk-object-cover { object-fit: cover; }
259
+ .uk-object-contain { object-fit: contain; }
260
+ .uk-object-fill { object-fit: fill; }
261
+ .uk-object-none { object-fit: none; }
262
+ .uk-object-scale-down { object-fit: scale-down; }
260
263
 
261
264
  /*
262
265
  * Position
@@ -55,10 +55,10 @@
55
55
 
56
56
  <h2>Stop Positions</h2>
57
57
 
58
- <div id="test-stop-positions" class="uk-height-large uk-background-cover uk-margin uk-overflow-hidden uk-light uk-flex" style="background-image: url('images/dark.jpg');" uk-parallax="bgx: 0,200,0,200">
58
+ <div id="test-stop-positions" class="uk-height-large uk-background-cover uk-margin uk-overflow-hidden uk-light uk-flex" style="background-image: url('images/dark.jpg');" uk-parallax="bgx: 0,50 50%, 200">
59
59
  <div class="uk-width-1-2@m uk-text-center uk-margin-auto uk-margin-auto-vertical">
60
- <h1 uk-parallax="x: -200,200,-200,200; scale: 2,1 10%,2 90%,1;">Headline</h1>
61
- <p uk-parallax="x: 200,-200,200,-200; scale: 1,0 20%,1 50%,0 80%,1">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
60
+ <h1 uk-parallax="x: -200,200 20%,-200 80%,200; scale: 1,1 50%,2;">Headline</h1>
61
+ <p uk-parallax="x: 200,-200 20%,200 80%,-200; scale: 1,1 50%,2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
62
62
  </div>
63
63
  </div>
64
64
 
@@ -77,8 +77,8 @@
77
77
  <div class="uk-grid uk-margin-auto uk-flex-inline">
78
78
  <div><div class="uk-card uk-card-default uk-padding-small" uk-parallax="target: #test-start-end; y: 396; easing: 0;">0 / 0</div></div>
79
79
  <div><div class="uk-card uk-card-default uk-padding-small" uk-parallax="target: #test-start-end; start: 100%; end: 100%; y: 396; easing: 0;">100% / 100%</div></div>
80
- <div><div class="uk-card uk-card-default uk-padding-small" uk-parallax="target: #test-start-end; start: 40vh; end: 40vh; y: 396; easing: 0;">40vh / 40vh</div></div>
81
- <div><div class="uk-card uk-card-default uk-padding-small" uk-parallax="target: #test-start-end; start: 100% + 50; end: 100% + 50; y: 396; easing: 0;">100% + 50 / 100% + 50</div></div>
80
+ <div><div class="uk-card uk-card-default uk-padding-small" uk-parallax="target: #test-start-end; start: 30vh; end: 30vh; y: 396; easing: 0;">30vh / 30vh</div></div>
81
+ <div><div class="uk-card uk-card-default uk-padding-small" uk-parallax="target: #test-start-end; start: 100% + 100; end: 100% + 100; y: 396; easing: 0;">100% + 100 / 100% + 100</div></div>
82
82
  </div>
83
83
  </div>
84
84
 
@@ -13,7 +13,7 @@
13
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
- <h1 class="uk-heading-2xlarge">Sticky Section</h1>
16
+ <h1 class="uk-heading-2xlarge" uk-parallax="target: !.uk-section +* +*; end: 100%; y: -400; easing: 0;">Sticky Section</h1>
17
17
 
18
18
  </div>
19
19
  </div>
@@ -21,8 +21,8 @@
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: 300vh">
25
- <div class="uk-flex uk-flex-center uk-flex-middle" style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-container">
24
+ <div id="js-sticky-parallax-container" class="uk-position-relative uk-background-muted uk-text-center uk-height-viewport-3">
25
+ <div class="uk-flex uk-flex-center uk-flex-middle uk-height-viewport" uk-sticky="bottom: #js-sticky-parallax-container">
26
26
  <div>
27
27
 
28
28
  <img class="uk-position-relative uk-position-z-index" src="images/size-v.jpg" width="400" height="800" alt="" style="max-width: 50vw" uk-parallax="target: #js-sticky-parallax-container; y: 0,-250; easing: -1; start: 100vh; end: 100vh;">
@@ -118,7 +118,7 @@
118
118
  </div>
119
119
  <div>
120
120
 
121
- <div class="uk-background-muted uk-text-center" style="height: 100vh" uk-sticky="bottom: #js-sticky-parallax-viewport">
121
+ <div class="uk-background-muted uk-text-center uk-height-viewport" uk-sticky="bottom: #js-sticky-parallax-viewport">
122
122
 
123
123
  <div uk-parallax="target: #js-sticky-parallax-viewport; start: 100vh; end: 100vh; y: 10vh, 80vh; easing: 0">
124
124
 
@@ -146,12 +146,12 @@
146
146
 
147
147
  <div class="uk-section uk-section-default">
148
148
 
149
- <div id="js-sticky-parallax-images" style="height: 250vh" uk-grid>
149
+ <div id="js-sticky-parallax-images" style="min-height: 250vh" uk-grid>
150
150
  <div class="uk-width-expand">
151
151
 
152
- <div class="uk-background-muted" style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-images">
152
+ <div class="uk-background-muted uk-height-viewport" uk-sticky="bottom: #js-sticky-parallax-images">
153
153
  <div uk-parallax="target: #js-sticky-parallax-images; y: 55vh, 45vh;">
154
- <img class="uk-position-center-left" src="images/photo.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images; start: 125vh; end: 100% + 100vh - 185vh; opacity: 1,1 99%,0; easing:0">
154
+ <img class="uk-position-center-left" src="images/photo.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images; start: 125vh; end: 100% + 100vh - 185vh; opacity: 1,1,0; easing:0">
155
155
  <img class="uk-position-center-left" src="images/photo2.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images; start: 175vh; end: 100% + 100vh - 235vh; opacity: 0,1 16.666%,1 99%,0; easing:0">
156
156
  <img class="uk-position-center-left" src="images/photo3.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images; start: 225vh; end: 100% + 100vh - 275vh; opacity: 0,1 20%,1; easing:0">
157
157
  </div>
@@ -206,10 +206,10 @@
206
206
 
207
207
  <div class="uk-section uk-section-default">
208
208
 
209
- <div id="js-sticky-parallax-images-all" style="height: 250vh" uk-grid>
209
+ <div id="js-sticky-parallax-images-all" style="min-height: 250vh" uk-grid>
210
210
  <div class="uk-width-expand">
211
211
 
212
- <div class="uk-background-muted" style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-images-all">
212
+ <div class="uk-background-muted uk-height-viewport" uk-sticky="bottom: #js-sticky-parallax-images-all">
213
213
  <div uk-parallax="target: #js-sticky-parallax-images-all; y: 55vh, 45vh;">
214
214
  <img class="uk-position-center-left" src="images/photo.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 160vh; opacity: 1,1 99%,0; easing:0">
215
215
  <img class="uk-position-center-left" src="images/photo2.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 210vh; opacity: 0,1 16.666%,1 99%,0; easing:0">
@@ -226,7 +226,7 @@
226
226
  </div>
227
227
  <div class="uk-width-expand">
228
228
 
229
- <div style="height: 100vh;" uk-sticky="bottom: #js-sticky-parallax-images-all">
229
+ <div class="uk-height-viewport" uk-sticky="bottom: #js-sticky-parallax-images-all">
230
230
  <div uk-parallax="target: #js-sticky-parallax-images-all; y: 55vh, 45vh;">
231
231
 
232
232
  <div class="uk-position-center-left" uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 150vh; opacity: 0,1 20%,1 80%,0">
@@ -243,6 +243,23 @@
243
243
  </div>
244
244
  </div>
245
245
 
246
+ <h2>Object Fit and Position</h2>
247
+
248
+ <div class="uk-child-width-1-3@s" uk-grid>
249
+ <div>
250
+ <p>Object Fit Cover</p>
251
+ <img class="uk-object-cover" src="images/photo.jpg" width="1000" height="1000" alt="" style="aspect-ratio: 1 / 1;">
252
+ </div>
253
+ <div>
254
+ <p>Object Fit Contain</p>
255
+ <img class="uk-object-contain" src="images/photo.jpg" width="1000" height="1000" alt="" style="aspect-ratio: 1 / 1;">
256
+ </div>
257
+ <div>
258
+ <p>Object Fit Cover Left</p>
259
+ <img class="uk-object-cover uk-object-top-left" src="images/photo.jpg" width="1000" height="1000" alt="" style="aspect-ratio: 1 / 1;">
260
+ </div>
261
+ </div>
262
+
246
263
  <h2>Box-shadows</h2>
247
264
 
248
265
  <div class="uk-child-width-1-5@m uk-grid-large" uk-grid>