uikit 3.11.2-dev.44c622843 → 3.11.2-dev.536e1a374

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 (154) hide show
  1. package/CHANGELOG.md +40 -19
  2. package/dist/css/uikit-core-rtl.css +97 -190
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +97 -190
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +99 -196
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +99 -196
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +24 -51
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +6 -8
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +30 -69
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +31 -71
  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 +117 -80
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +117 -80
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +87 -58
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +117 -80
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +43 -29
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +5 -7
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +3 -3
  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 +600 -508
  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 +857 -764
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/component.js +2 -11
  44. package/src/js/api/hooks.js +3 -3
  45. package/src/js/api/state.js +173 -140
  46. package/src/js/components/countdown.js +24 -51
  47. package/src/js/components/filter.js +2 -3
  48. package/src/js/components/internal/lightbox-animations.js +4 -3
  49. package/src/js/components/internal/slider-preload.js +9 -0
  50. package/src/js/components/internal/slideshow-animations.js +4 -3
  51. package/src/js/components/lightbox-panel.js +34 -58
  52. package/src/js/components/lightbox.js +1 -2
  53. package/src/js/components/slider.js +60 -43
  54. package/src/js/components/slideshow.js +8 -1
  55. package/src/js/components/sortable.js +1 -1
  56. package/src/js/components/upload.js +2 -1
  57. package/src/js/core/accordion.js +6 -1
  58. package/src/js/core/alert.js +1 -2
  59. package/src/js/core/core.js +2 -75
  60. package/src/js/core/cover.js +5 -1
  61. package/src/js/core/drop.js +3 -1
  62. package/src/js/core/form-custom.js +2 -2
  63. package/src/js/core/height-viewport.js +3 -0
  64. package/src/js/core/icon.js +13 -6
  65. package/src/js/core/img.js +131 -122
  66. package/src/js/core/modal.js +1 -2
  67. package/src/js/core/navbar.js +3 -3
  68. package/src/js/core/offcanvas.js +2 -1
  69. package/src/js/core/sticky.js +51 -57
  70. package/src/js/core/svg.js +10 -6
  71. package/src/js/core/switcher.js +11 -3
  72. package/src/js/core/toggle.js +5 -2
  73. package/src/js/core/video.js +13 -1
  74. package/src/js/mixin/internal/animate-slide.js +9 -12
  75. package/src/js/mixin/lazyload.js +20 -0
  76. package/src/js/mixin/parallax.js +118 -81
  77. package/src/js/mixin/slider.js +8 -22
  78. package/src/js/mixin/slideshow.js +2 -6
  79. package/src/js/mixin/swipe.js +72 -0
  80. package/src/js/mixin/togglable.js +2 -3
  81. package/src/js/util/ajax.js +15 -14
  82. package/src/js/util/animation.js +7 -12
  83. package/src/js/util/dimensions.js +4 -4
  84. package/src/js/util/dom.js +22 -33
  85. package/src/js/util/filter.js +1 -2
  86. package/src/js/util/index.js +1 -0
  87. package/src/js/util/lang.js +7 -6
  88. package/src/js/util/observer.js +36 -0
  89. package/src/js/util/options.js +2 -11
  90. package/src/js/util/player.js +5 -4
  91. package/src/js/util/selector.js +12 -18
  92. package/src/js/util/style.js +4 -4
  93. package/src/less/components/base.less +10 -33
  94. package/src/less/components/form-range.less +48 -95
  95. package/src/less/components/form.less +0 -1
  96. package/src/less/components/height.less +3 -0
  97. package/src/less/components/leader.less +0 -1
  98. package/src/less/components/lightbox.less +0 -1
  99. package/src/less/components/modal.less +3 -7
  100. package/src/less/components/progress.less +14 -36
  101. package/src/less/components/slider.less +0 -3
  102. package/src/less/components/slideshow.less +0 -3
  103. package/src/less/components/text.less +16 -32
  104. package/src/less/components/utility.less +6 -3
  105. package/src/scss/components/base.scss +10 -33
  106. package/src/scss/components/form-range.scss +48 -95
  107. package/src/scss/components/form.scss +0 -1
  108. package/src/scss/components/height.scss +3 -0
  109. package/src/scss/components/leader.scss +0 -1
  110. package/src/scss/components/lightbox.scss +0 -1
  111. package/src/scss/components/modal.scss +3 -7
  112. package/src/scss/components/progress.scss +14 -36
  113. package/src/scss/components/slider.scss +0 -3
  114. package/src/scss/components/slideshow.scss +0 -3
  115. package/src/scss/components/text.scss +16 -32
  116. package/src/scss/components/utility.scss +6 -3
  117. package/src/scss/mixins-theme.scss +1 -1
  118. package/src/scss/mixins.scss +1 -1
  119. package/src/scss/variables-theme.scss +3 -3
  120. package/src/scss/variables.scss +3 -3
  121. package/tests/align.html +10 -10
  122. package/tests/animation.html +2 -2
  123. package/tests/article.html +2 -2
  124. package/tests/base.html +3 -3
  125. package/tests/card.html +10 -10
  126. package/tests/column.html +3 -3
  127. package/tests/comment.html +9 -9
  128. package/tests/countdown.html +10 -8
  129. package/tests/dotnav.html +3 -3
  130. package/tests/image.html +296 -64
  131. package/tests/images/image-type.avif +0 -0
  132. package/tests/images/image-type.jpeg +0 -0
  133. package/tests/images/image-type.webp +0 -0
  134. package/tests/index.html +8 -8
  135. package/tests/lightbox.html +10 -10
  136. package/tests/marker.html +2 -2
  137. package/tests/modal.html +8 -9
  138. package/tests/navbar.html +2 -2
  139. package/tests/overlay.html +7 -7
  140. package/tests/parallax.html +16 -7
  141. package/tests/position.html +12 -12
  142. package/tests/slidenav.html +12 -12
  143. package/tests/slider.html +20 -20
  144. package/tests/sortable.html +1 -1
  145. package/tests/sticky-parallax.html +56 -71
  146. package/tests/svg.html +6 -6
  147. package/tests/table.html +11 -11
  148. package/tests/thumbnav.html +12 -12
  149. package/tests/transition.html +30 -30
  150. package/tests/utility.html +50 -33
  151. package/tests/video.html +1 -1
  152. package/tests/width.html +1 -1
  153. package/src/js/util/promise.js +0 -0
  154. package/tests/images/animated.gif +0 -0
@@ -2,18 +2,15 @@ import { on } from './event';
2
2
  import { assign, noop } from './lang';
3
3
 
4
4
  export function ajax(url, options) {
5
- const env = assign(
6
- {
7
- data: null,
8
- method: 'GET',
9
- headers: {},
10
- xhr: new XMLHttpRequest(),
11
- beforeSend: noop,
12
- responseType: '',
13
- },
14
- options
15
- );
16
-
5
+ const env = {
6
+ data: null,
7
+ method: 'GET',
8
+ headers: {},
9
+ xhr: new XMLHttpRequest(),
10
+ beforeSend: noop,
11
+ responseType: '',
12
+ ...options,
13
+ };
17
14
  return Promise.resolve()
18
15
  .then(() => env.beforeSend(env))
19
16
  .then(() => send(url, env));
@@ -63,8 +60,12 @@ export function getImage(src, srcset, sizes) {
63
60
  return new Promise((resolve, reject) => {
64
61
  const img = new Image();
65
62
 
66
- img.onerror = (e) => reject(e);
67
- img.onload = () => resolve(img);
63
+ img.onerror = (e) => {
64
+ reject(e);
65
+ };
66
+ img.onload = () => {
67
+ resolve(img);
68
+ };
68
69
 
69
70
  sizes && (img.sizes = sizes);
70
71
  srcset && (img.srcset = srcset);
@@ -1,7 +1,7 @@
1
1
  import { attr } from './attr';
2
2
  import { once, trigger } from './event';
3
3
  import { css, propName } from './style';
4
- import { assign, startsWith, toNodes } from './lang';
4
+ 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') {
@@ -35,17 +35,12 @@ export function transition(element, props, duration = 400, timing = 'linear') {
35
35
  );
36
36
 
37
37
  addClass(element, 'uk-transition');
38
- css(
39
- element,
40
- assign(
41
- {
42
- transitionProperty: Object.keys(props).map(propName).join(','),
43
- transitionDuration: `${duration}ms`,
44
- transitionTimingFunction: timing,
45
- },
46
- props
47
- )
48
- );
38
+ css(element, {
39
+ transitionProperty: Object.keys(props).map(propName).join(','),
40
+ transitionDuration: `${duration}ms`,
41
+ transitionTimingFunction: timing,
42
+ ...props,
43
+ });
49
44
  })
50
45
  )
51
46
  );
@@ -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));
@@ -12,6 +12,10 @@ export function ready(fn) {
12
12
  once(document, 'DOMContentLoaded', fn);
13
13
  }
14
14
 
15
+ export function isTag(element, tagName) {
16
+ return element?.tagName?.toLowerCase() === tagName.toLowerCase();
17
+ }
18
+
15
19
  export function empty(element) {
16
20
  return replaceChildren(element, '');
17
21
  }
@@ -20,34 +24,18 @@ export function html(parent, html) {
20
24
  return isUndefined(html) ? $(parent).innerHTML : replaceChildren(parent, html);
21
25
  }
22
26
 
23
- export function replaceChildren(parent, element) {
24
- const nodes = $$(element);
25
- $(parent).replaceChildren(...nodes);
26
- return nodes;
27
- }
28
-
29
- export function prepend(parent, element) {
30
- const nodes = $$(element);
31
- $(parent).prepend(...nodes);
32
- return nodes;
33
- }
27
+ export const replaceChildren = applyFn('replaceChildren');
28
+ export const prepend = applyFn('prepend');
29
+ export const append = applyFn('append');
30
+ export const before = applyFn('before');
31
+ export const after = applyFn('after');
34
32
 
35
- export function append(parent, element) {
36
- const nodes = $$(element);
37
- $(parent).append(...nodes);
38
- return nodes;
39
- }
40
-
41
- export function before(ref, element) {
42
- const nodes = $$(element);
43
- $(ref).before(...nodes);
44
- return nodes;
45
- }
46
-
47
- export function after(ref, element) {
48
- const nodes = $$(element);
49
- $(ref).after(...nodes);
50
- return nodes;
33
+ function applyFn(fn) {
34
+ return function (ref, element) {
35
+ const nodes = toNodes(isString(element) ? fragment(element) : element);
36
+ $(ref)?.[fn](...nodes);
37
+ return unwrapSingle(nodes);
38
+ };
51
39
  }
52
40
 
53
41
  export function remove(element) {
@@ -69,7 +57,7 @@ export function wrapAll(element, structure) {
69
57
  export function wrapInner(element, structure) {
70
58
  return toNodes(
71
59
  toNodes(element).map((element) =>
72
- element.hasChildNodes
60
+ element.hasChildNodes()
73
61
  ? wrapAll(toNodes(element.childNodes), structure)
74
62
  : append(element, structure)
75
63
  )
@@ -80,10 +68,7 @@ export function unwrap(element) {
80
68
  toNodes(element)
81
69
  .map(parent)
82
70
  .filter((value, index, self) => self.indexOf(value) === index)
83
- .forEach((parent) => {
84
- before(parent, parent.childNodes);
85
- remove(parent);
86
- });
71
+ .forEach((parent) => parent.replaceWith(...parent.childNodes));
87
72
  }
88
73
 
89
74
  const fragmentRe = /^\s*<(\w+|!)[^>]*>/;
@@ -102,7 +87,11 @@ export function fragment(html) {
102
87
  container.textContent = html;
103
88
  }
104
89
 
105
- return container.childNodes.length > 1 ? toNodes(container.childNodes) : container.firstChild;
90
+ return unwrapSingle(container.childNodes);
91
+ }
92
+
93
+ function unwrapSingle(nodes) {
94
+ return nodes.length > 1 ? nodes : nodes[0];
106
95
  }
107
96
 
108
97
  export function apply(node, fn) {
@@ -39,8 +39,7 @@ export function isFocusable(element) {
39
39
  }
40
40
 
41
41
  export function parent(element) {
42
- element = toNode(element);
43
- return element && isElement(element.parentNode) && element.parentNode;
42
+ return toNode(element)?.parentElement;
44
43
  }
45
44
 
46
45
  export function filter(element, selector) {
@@ -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';
@@ -21,19 +21,19 @@ function toUpper(_, c) {
21
21
  }
22
22
 
23
23
  export function startsWith(str, search) {
24
- return str.startsWith(search);
24
+ return str?.startsWith?.(search);
25
25
  }
26
26
 
27
27
  export function endsWith(str, search) {
28
- return str.endsWith(search);
28
+ return str?.endsWith?.(search);
29
29
  }
30
30
 
31
31
  export function includes(obj, search) {
32
- return obj && obj.includes(search);
32
+ return obj?.includes?.(search);
33
33
  }
34
34
 
35
35
  export function findIndex(array, predicate) {
36
- return array.findIndex(predicate);
36
+ return array?.findIndex?.(predicate);
37
37
  }
38
38
 
39
39
  export const { isArray, from: toArray } = Array;
@@ -128,8 +128,9 @@ export function toWindow(element) {
128
128
  }
129
129
 
130
130
  element = toNode(element);
131
+ const document = isDocument(element) ? element : element?.ownerDocument;
131
132
 
132
- return element ? (isDocument(element) ? element : element.ownerDocument).defaultView : window;
133
+ return document?.defaultView || window;
133
134
  }
134
135
 
135
136
  export function toMs(time) {
@@ -216,7 +217,7 @@ export const Dimensions = {
216
217
  },
217
218
 
218
219
  contain(dimensions, maxDimensions) {
219
- dimensions = assign({}, dimensions);
220
+ dimensions = { ...dimensions };
220
221
 
221
222
  each(
222
223
  dimensions,
@@ -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
+ }
@@ -1,13 +1,4 @@
1
- import {
2
- assign,
3
- hasOwn,
4
- includes,
5
- isArray,
6
- isFunction,
7
- isUndefined,
8
- sortBy,
9
- startsWith,
10
- } from './lang';
1
+ import { hasOwn, includes, isArray, isFunction, isUndefined, sortBy, startsWith } from './lang';
11
2
 
12
3
  const strats = {};
13
4
 
@@ -48,7 +39,7 @@ strats.props = function (parentVal, childVal) {
48
39
 
49
40
  // extend strategy
50
41
  strats.computed = strats.methods = function (parentVal, childVal) {
51
- return childVal ? (parentVal ? assign({}, parentVal, childVal) : childVal) : parentVal;
42
+ return childVal ? (parentVal ? { ...parentVal, ...childVal } : childVal) : parentVal;
52
43
  };
53
44
 
54
45
  // data strategy
@@ -1,5 +1,6 @@
1
+ import { isTag } from './dom';
1
2
  import { once } from './event';
2
- import { assign, includes, noop } from './lang';
3
+ import { includes, noop } from './lang';
3
4
 
4
5
  export function play(el) {
5
6
  if (isIFrame(el)) {
@@ -40,11 +41,11 @@ export function isVideo(el) {
40
41
  }
41
42
 
42
43
  function isHTML5(el) {
43
- return el?.tagName === 'VIDEO';
44
+ return isTag(el, 'video');
44
45
  }
45
46
 
46
47
  function isIFrame(el) {
47
- return el?.tagName === 'IFRAME' && (isYoutube(el) || isVimeo(el));
48
+ return isTag(el, 'iframe') && (isYoutube(el) || isVimeo(el));
48
49
  }
49
50
 
50
51
  function isYoutube(el) {
@@ -64,7 +65,7 @@ async function call(el, cmd) {
64
65
 
65
66
  function post(el, cmd) {
66
67
  try {
67
- el.contentWindow.postMessage(JSON.stringify(assign({ event: 'command' }, cmd)), '*');
68
+ el.contentWindow.postMessage(JSON.stringify({ event: 'command', ...cmd }), '*');
68
69
  } catch (e) {
69
70
  // noop
70
71
  }
@@ -1,5 +1,4 @@
1
1
  import { attr } from './attr';
2
- import { inBrowser } from './env';
3
2
  import { closest, index, matches, parent } from './filter';
4
3
  import { isDocument, isString, memoize, toNode, toNodes } from './lang';
5
4
 
@@ -11,12 +10,6 @@ export function queryAll(selector, context) {
11
10
  return findAll(selector, getContext(selector, context));
12
11
  }
13
12
 
14
- function getContext(selector, context = document) {
15
- return (isString(selector) && isContextSelector(selector)) || isDocument(context)
16
- ? context
17
- : context.ownerDocument;
18
- }
19
-
20
13
  export function find(selector, context) {
21
14
  return toNode(_query(selector, context, 'querySelector'));
22
15
  }
@@ -25,6 +18,17 @@ export function findAll(selector, context) {
25
18
  return toNodes(_query(selector, context, 'querySelectorAll'));
26
19
  }
27
20
 
21
+ const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
22
+ const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
23
+
24
+ function getContext(selector, context = document) {
25
+ return (isString(selector) && isContextSelector(selector)) || isDocument(context)
26
+ ? context
27
+ : context.ownerDocument;
28
+ }
29
+
30
+ const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
31
+
28
32
  function _query(selector, context = document, queryFn) {
29
33
  if (!selector || !isString(selector)) {
30
34
  return selector;
@@ -69,11 +73,6 @@ function _query(selector, context = document, queryFn) {
69
73
  }
70
74
  }
71
75
 
72
- const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
73
- const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
74
-
75
- const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
76
-
77
76
  const selectorRe = /.*?[^\\](?:,|$)/g;
78
77
 
79
78
  const splitSelector = memoize((selector) =>
@@ -99,11 +98,6 @@ function domPath(element) {
99
98
  return names.join(' > ');
100
99
  }
101
100
 
102
- const escapeFn =
103
- (inBrowser && window.CSS && CSS.escape) ||
104
- function (css) {
105
- return css.replace(/([^\x7f-\uFFFF\w-])/g, (match) => `\\${match}`);
106
- };
107
101
  export function escape(css) {
108
- return isString(css) ? escapeFn.call(null, css) : '';
102
+ return isString(css) ? CSS.escape(css) : '';
109
103
  }
@@ -31,7 +31,8 @@ const cssNumber = {
31
31
  };
32
32
 
33
33
  export function css(element, property, value, priority = '') {
34
- return toNodes(element).map((element) => {
34
+ const elements = toNodes(element);
35
+ for (const element of elements) {
35
36
  if (isString(property)) {
36
37
  property = propName(property);
37
38
 
@@ -57,9 +58,8 @@ export function css(element, property, value, priority = '') {
57
58
  priority = value;
58
59
  each(property, (value, property) => css(element, property, value, priority));
59
60
  }
60
-
61
- return element;
62
- })[0];
61
+ }
62
+ return elements[0];
63
63
  }
64
64
 
65
65
  function getStyles(element, pseudoElt) {
@@ -91,7 +91,6 @@
91
91
 
92
92
  /*
93
93
  * 1. Set `font-size` to support `rem` units
94
- * Not using `font` property because a leading hyphen (e.g. -apple-system) causes the font to break in IE11 and Edge
95
94
  * 2. Prevent adjustments of font size after orientation changes in iOS.
96
95
  * 3. Style
97
96
  */
@@ -239,7 +238,7 @@ sub { bottom: -0.25em; }
239
238
  ========================================================================== */
240
239
 
241
240
  /*
242
- * Remove the gap between embedded content and the bottom of their containers.
241
+ * Remove the gap between the element and the bottom of its parent container.
243
242
  */
244
243
 
245
244
  audio,
@@ -250,14 +249,14 @@ svg,
250
249
  video { vertical-align: middle; }
251
250
 
252
251
  /*
253
- * 1. Add responsiveness.
254
- * 2. Auto-scale the height. Only needed if `height` attribute is present.
255
- * 3. Corrects responsive `max-width` behavior if padding and border are used.
256
- * 4. Exclude SVGs for IE11 because they don't preserve their aspect ratio.
252
+ * 1. Constrain the element to its parent width.
253
+ * 2. Preserve the intrinsic aspect ratio and auto-scale the height of an image if the `height` attribute is present.
254
+ * 3. Take border and padding into account.
257
255
  */
258
256
 
259
257
  canvas,
260
258
  img,
259
+ svg,
261
260
  video {
262
261
  /* 1 */
263
262
  max-width: 100%;
@@ -267,34 +266,17 @@ video {
267
266
  box-sizing: border-box;
268
267
  }
269
268
 
270
- /* 4 */
271
- @supports (display: block) {
272
-
273
- svg {
274
- max-width: 100%;
275
- height: auto;
276
- box-sizing: border-box;
277
- }
278
-
279
- }
280
-
281
- /*
282
- * Hide the overflow in IE.
283
- */
284
-
285
- svg:not(:root) { overflow: hidden; }
286
-
287
269
  /*
288
- * 1. Fix lazy loading images if parent element is set to `display: inline` and has `overflow: hidden`.
289
- * 2. Hide `alt` text for lazy loading images.
290
- * Note: Selector for background while loading img[data-src*='.jpg'][src*='data:image'] { background: grey; }
270
+ * Deprecated: only needed for `img` elements with `uk-img`
271
+ * 1. Hide `alt` text for lazy load images.
272
+ * 2. Fix lazy loading images if parent element is set to `display: inline` and has `overflow: hidden`.
291
273
  */
292
274
 
293
275
  img:not([src]) {
294
276
  /* 1 */
295
- min-width: 1px;
296
- /* 2 */
297
277
  visibility: hidden;
278
+ /* 2 */
279
+ min-width: 1px;
298
280
  }
299
281
 
300
282
  /*
@@ -589,11 +571,6 @@ template { display: none; }
589
571
  * Breakpoints
590
572
  */
591
573
 
592
- .uk-breakpoint-s::before { content: '@{breakpoint-small}'; }
593
- .uk-breakpoint-m::before { content: '@{breakpoint-medium}'; }
594
- .uk-breakpoint-l::before { content: '@{breakpoint-large}'; }
595
- .uk-breakpoint-xl::before { content: '@{breakpoint-xlarge}'; }
596
-
597
574
  :root {
598
575
  --uk-breakpoint-s: @breakpoint-small;
599
576
  --uk-breakpoint-m: @breakpoint-medium;