uikit 3.7.6 → 3.8.0

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 (121) hide show
  1. package/CHANGELOG.md +23 -6
  2. package/build/prefix.js +2 -2
  3. package/build/release.js +12 -16
  4. package/build/scope.js +14 -19
  5. package/build/util.js +1 -1
  6. package/dist/css/uikit-core-rtl.css +327 -835
  7. package/dist/css/uikit-core-rtl.min.css +1 -1
  8. package/dist/css/uikit-core.css +327 -835
  9. package/dist/css/uikit-core.min.css +1 -1
  10. package/dist/css/uikit-rtl.css +359 -843
  11. package/dist/css/uikit-rtl.min.css +1 -1
  12. package/dist/css/uikit.css +359 -843
  13. package/dist/css/uikit.min.css +1 -1
  14. package/dist/js/components/countdown.js +1 -1
  15. package/dist/js/components/countdown.min.js +1 -1
  16. package/dist/js/components/filter.js +1 -1
  17. package/dist/js/components/filter.min.js +1 -1
  18. package/dist/js/components/lightbox-panel.js +2 -18
  19. package/dist/js/components/lightbox-panel.min.js +2 -2
  20. package/dist/js/components/lightbox.js +2 -18
  21. package/dist/js/components/lightbox.min.js +2 -2
  22. package/dist/js/components/notification.js +1 -1
  23. package/dist/js/components/notification.min.js +1 -1
  24. package/dist/js/components/parallax.js +1 -1
  25. package/dist/js/components/parallax.min.js +1 -1
  26. package/dist/js/components/slider-parallax.js +1 -1
  27. package/dist/js/components/slider-parallax.min.js +1 -1
  28. package/dist/js/components/slider.js +1 -1
  29. package/dist/js/components/slider.min.js +1 -1
  30. package/dist/js/components/slideshow-parallax.js +1 -1
  31. package/dist/js/components/slideshow-parallax.min.js +1 -1
  32. package/dist/js/components/slideshow.js +1 -1
  33. package/dist/js/components/slideshow.min.js +1 -1
  34. package/dist/js/components/sortable.js +1 -1
  35. package/dist/js/components/sortable.min.js +1 -1
  36. package/dist/js/components/tooltip.js +1 -1
  37. package/dist/js/components/tooltip.min.js +1 -1
  38. package/dist/js/components/upload.js +1 -1
  39. package/dist/js/components/upload.min.js +1 -1
  40. package/dist/js/uikit-core.js +8 -21
  41. package/dist/js/uikit-core.min.js +2 -2
  42. package/dist/js/uikit-icons.js +1 -1
  43. package/dist/js/uikit-icons.min.js +1 -1
  44. package/dist/js/uikit.js +8 -21
  45. package/dist/js/uikit.min.js +2 -2
  46. package/package.json +6 -6
  47. package/src/js/core/sticky.js +5 -2
  48. package/src/js/mixin/modal.js +1 -17
  49. package/src/less/components/accordion.less +3 -6
  50. package/src/less/components/alert.less +2 -3
  51. package/src/less/components/animation.less +69 -216
  52. package/src/less/components/badge.less +2 -5
  53. package/src/less/components/base.less +39 -11
  54. package/src/less/components/breadcrumb.less +3 -5
  55. package/src/less/components/button.less +17 -36
  56. package/src/less/components/close.less +3 -6
  57. package/src/less/components/cover.less +11 -6
  58. package/src/less/components/dotnav.less +3 -6
  59. package/src/less/components/dropdown.less +1 -3
  60. package/src/less/components/icon.less +5 -11
  61. package/src/less/components/iconnav.less +3 -6
  62. package/src/less/components/lightbox.less +11 -7
  63. package/src/less/components/link.less +6 -14
  64. package/src/less/components/marker.less +3 -6
  65. package/src/less/components/nav.less +10 -24
  66. package/src/less/components/navbar.less +6 -15
  67. package/src/less/components/pagination.less +3 -5
  68. package/src/less/components/position.less +45 -82
  69. package/src/less/components/search.less +3 -11
  70. package/src/less/components/slidenav.less +3 -6
  71. package/src/less/components/slider.less +0 -4
  72. package/src/less/components/slideshow.less +0 -4
  73. package/src/less/components/subnav.less +6 -11
  74. package/src/less/components/tab.less +3 -5
  75. package/src/less/components/thumbnav.less +3 -6
  76. package/src/less/components/totop.less +3 -6
  77. package/src/less/components/transition.less +48 -40
  78. package/src/less/components/utility.less +3 -6
  79. package/src/less/components/visibility.less +16 -45
  80. package/src/less/theme/button.less +0 -3
  81. package/src/less/theme/form.less +1 -1
  82. package/src/less/theme/table.less +9 -1
  83. package/src/scss/components/accordion.scss +2 -4
  84. package/src/scss/components/alert.scss +2 -3
  85. package/src/scss/components/animation.scss +69 -216
  86. package/src/scss/components/badge.scss +1 -3
  87. package/src/scss/components/base.scss +31 -9
  88. package/src/scss/components/breadcrumb.scss +2 -3
  89. package/src/scss/components/button.scss +12 -25
  90. package/src/scss/components/close.scss +2 -4
  91. package/src/scss/components/cover.scss +11 -6
  92. package/src/scss/components/dotnav.scss +2 -4
  93. package/src/scss/components/dropdown.scss +1 -3
  94. package/src/scss/components/icon.scss +3 -7
  95. package/src/scss/components/iconnav.scss +2 -4
  96. package/src/scss/components/lightbox.scss +11 -7
  97. package/src/scss/components/link.scss +3 -8
  98. package/src/scss/components/marker.scss +2 -4
  99. package/src/scss/components/nav.scss +6 -16
  100. package/src/scss/components/navbar.scss +6 -13
  101. package/src/scss/components/pagination.scss +2 -3
  102. package/src/scss/components/position.scss +45 -82
  103. package/src/scss/components/search.scss +2 -9
  104. package/src/scss/components/slidenav.scss +2 -4
  105. package/src/scss/components/slider.scss +0 -4
  106. package/src/scss/components/slideshow.scss +0 -4
  107. package/src/scss/components/subnav.scss +4 -7
  108. package/src/scss/components/tab.scss +2 -3
  109. package/src/scss/components/thumbnav.scss +2 -4
  110. package/src/scss/components/totop.scss +2 -4
  111. package/src/scss/components/transition.scss +48 -40
  112. package/src/scss/components/utility.scss +2 -4
  113. package/src/scss/components/visibility.scss +16 -45
  114. package/src/scss/mixins-theme.scss +42 -101
  115. package/src/scss/mixins.scss +38 -66
  116. package/src/scss/theme/button.scss +0 -2
  117. package/src/scss/theme/form.scss +1 -1
  118. package/src/scss/theme/table.scss +2 -1
  119. package/src/scss/variables-theme.scss +4 -1
  120. package/src/scss/variables.scss +3 -0
  121. package/tests/transition.html +4 -10
@@ -14,20 +14,25 @@
14
14
 
15
15
  /*
16
16
  * Works with iframes and embedded content
17
- * 1. Reset responsiveness for embedded content
18
- * 2. Center object
17
+ * 1. Apply transform instantly. Needed if transform is transitioned.
18
+ * 2. Reset responsiveness for embedded content
19
+ * 3. Center object
19
20
  * Note: Percent values on the `top` property only works if this element
20
21
  * is absolute positioned or if the container has a height
21
22
  */
22
23
 
23
- .uk-cover {
24
- /* 1 */
25
- max-width: none;
24
+ .uk-cover,
25
+ /* 1 */
26
+ [uk-cover] {
26
27
  /* 2 */
28
+ max-width: none;
29
+ /* 3 */
27
30
  position: absolute;
28
31
  left: 50%;
29
32
  top: 50%;
30
- transform: translate(-50%,-50%);
33
+ --uk-position-translate-x: -50%;
34
+ --uk-position-translate-y: -50%;
35
+ transform: translate(var(--uk-position-translate-x), var(--uk-position-translate-y));
31
36
  }
32
37
 
33
38
  iframe.uk-cover { pointer-events: none; }
@@ -84,11 +84,9 @@ $dotnav-item-active-background: rgba($global-color, 0.6) !defau
84
84
  @if(mixin-exists(hook-dotnav-item)) {@include hook-dotnav-item();}
85
85
  }
86
86
 
87
- /* Hover + Focus */
88
- .uk-dotnav > * > :hover,
89
- .uk-dotnav > * > :focus {
87
+ /* Hover */
88
+ .uk-dotnav > * > :hover {
90
89
  background-color: $dotnav-item-hover-background;
91
- outline: none;
92
90
  @if(mixin-exists(hook-dotnav-item-hover)) {@include hook-dotnav-item-hover();}
93
91
  }
94
92
 
@@ -85,9 +85,8 @@ $dropdown-nav-sublist-item-hover-color: $global-color !default;
85
85
  @if(mixin-exists(hook-dropdown-nav-item)) {@include hook-dropdown-nav-item();}
86
86
  }
87
87
 
88
- /* Hover + Focus + Active */
88
+ /* Hover + Active */
89
89
  .uk-dropdown-nav > li > a:hover,
90
- .uk-dropdown-nav > li > a:focus,
91
90
  .uk-dropdown-nav > li.uk-active > a {
92
91
  color: $dropdown-nav-item-hover-color;
93
92
  @if(mixin-exists(hook-dropdown-nav-item-hover)) {@include hook-dropdown-nav-item-hover();}
@@ -118,7 +117,6 @@ $dropdown-nav-sublist-item-hover-color: $global-color !default;
118
117
  .uk-dropdown-nav .uk-nav-sub a { color: $dropdown-nav-sublist-item-color; }
119
118
 
120
119
  .uk-dropdown-nav .uk-nav-sub a:hover,
121
- .uk-dropdown-nav .uk-nav-sub a:focus,
122
120
  .uk-dropdown-nav .uk-nav-sub li.uk-active > a { color: $dropdown-nav-sublist-item-hover-color; }
123
121
 
124
122
 
@@ -131,10 +131,8 @@ button.uk-icon:not(:disabled) { cursor: pointer; }
131
131
  @if(mixin-exists(hook-icon-link)) {@include hook-icon-link();}
132
132
  }
133
133
 
134
- .uk-icon-link:hover,
135
- .uk-icon-link:focus {
134
+ .uk-icon-link:hover {
136
135
  color: $icon-link-hover-color;
137
- outline: none;
138
136
  @if(mixin-exists(hook-icon-link-hover)) {@include hook-icon-link-hover();}
139
137
  }
140
138
 
@@ -165,12 +163,10 @@ button.uk-icon:not(:disabled) { cursor: pointer; }
165
163
  @if(mixin-exists(hook-icon-button)) {@include hook-icon-button();}
166
164
  }
167
165
 
168
- /* Hover + Focus */
169
- .uk-icon-button:hover,
170
- .uk-icon-button:focus {
166
+ /* Hover */
167
+ .uk-icon-button:hover {
171
168
  background-color: $icon-button-hover-background;
172
169
  color: $icon-button-hover-color;
173
- outline: none;
174
170
  @if(mixin-exists(hook-icon-button-hover)) {@include hook-icon-button-hover();}
175
171
  }
176
172
 
@@ -84,11 +84,9 @@ $iconnav-item-active-color: $global-color !default;
84
84
  @if(mixin-exists(hook-iconnav-item)) {@include hook-iconnav-item();}
85
85
  }
86
86
 
87
- /* Hover + Focus */
88
- .uk-iconnav > * > a:hover,
89
- .uk-iconnav > * > a:focus {
87
+ /* Hover */
88
+ .uk-iconnav > * > a:hover {
90
89
  color: $iconnav-item-hover-color;
91
- outline: none;
92
90
  @if(mixin-exists(hook-iconnav-item-hover)) {@include hook-iconnav-item-hover();}
93
91
  }
94
92
 
@@ -22,6 +22,8 @@
22
22
  $lightbox-z-index: $global-z-index + 10 !default;
23
23
  $lightbox-background: #000 !default;
24
24
 
25
+ $lightbox-focus-outline: rgba(255,255,255,0.7) !default;
26
+
25
27
  $lightbox-item-color: rgba(255,255,255,0.7) !default;
26
28
  $lightbox-item-max-width: 100vw !default;
27
29
  $lightbox-item-max-height: 100vh !default;
@@ -89,6 +91,13 @@ $lightbox-button-hover-color: #fff !default;
89
91
  opacity: 1;
90
92
  }
91
93
 
94
+ /*
95
+ * Focus
96
+ */
97
+
98
+ .uk-lightbox :focus { outline-color: $lightbox-focus-outline; }
99
+ .uk-lightbox :focus-visible { outline-color: $lightbox-focus-outline; }
100
+
92
101
 
93
102
  /* Page
94
103
  ========================================================================== */
@@ -111,7 +120,6 @@ $lightbox-button-hover-color: #fff !default;
111
120
  * 5. Responsiveness
112
121
  * Using `vh` for `max-height` to fix image proportions after resize in Safari and Opera
113
122
  * Using `vh` and `vw` to make responsive image work in IE11
114
- * 6. Suppress outline on focus
115
123
  */
116
124
 
117
125
  .uk-lightbox-items > * {
@@ -138,9 +146,6 @@ $lightbox-button-hover-color: #fff !default;
138
146
  max-height: $lightbox-item-max-height;
139
147
  }
140
148
 
141
- /* 6 */
142
- .uk-lightbox-items > :focus { outline: none; }
143
-
144
149
  .uk-lightbox-items > * > :not(iframe) {
145
150
  width: auto;
146
151
  height: auto;
@@ -201,9 +206,8 @@ $lightbox-button-hover-color: #fff !default;
201
206
  @if(mixin-exists(hook-lightbox-button)) {@include hook-lightbox-button();}
202
207
  }
203
208
 
204
- /* Hover + Focus */
205
- .uk-lightbox-button:hover,
206
- .uk-lightbox-button:focus {
209
+ /* Hover */
210
+ .uk-lightbox-button:hover {
207
211
  color: $lightbox-button-hover-color;
208
212
  @if(mixin-exists(hook-lightbox-button-hover)) {@include hook-lightbox-button-hover();}
209
213
  }
@@ -39,8 +39,7 @@ a.uk-link-muted,
39
39
 
40
40
  a.uk-link-muted:hover,
41
41
  .uk-link-muted a:hover,
42
- .uk-link-toggle:hover .uk-link-muted,
43
- .uk-link-toggle:focus .uk-link-muted {
42
+ .uk-link-toggle:hover .uk-link-muted {
44
43
  color: $link-muted-hover-color;
45
44
  @if(mixin-exists(hook-link-muted-hover)) {@include hook-link-muted-hover();}
46
45
  }
@@ -57,8 +56,7 @@ a.uk-link-text,
57
56
 
58
57
  a.uk-link-text:hover,
59
58
  .uk-link-text a:hover,
60
- .uk-link-toggle:hover .uk-link-text,
61
- .uk-link-toggle:focus .uk-link-text {
59
+ .uk-link-toggle:hover .uk-link-text {
62
60
  color: $link-text-hover-color;
63
61
  @if(mixin-exists(hook-link-text-hover)) {@include hook-link-text-hover();}
64
62
  }
@@ -75,8 +73,7 @@ a.uk-link-heading,
75
73
 
76
74
  a.uk-link-heading:hover,
77
75
  .uk-link-heading a:hover,
78
- .uk-link-toggle:hover .uk-link-heading,
79
- .uk-link-toggle:focus .uk-link-heading {
76
+ .uk-link-toggle:hover .uk-link-heading {
80
77
  color: $link-heading-hover-color;
81
78
  text-decoration: $link-heading-hover-text-decoration;
82
79
  @if(mixin-exists(hook-link-heading-hover)) {@include hook-link-heading-hover();}
@@ -105,8 +102,6 @@ a.uk-link-reset,
105
102
  color: inherit !important;
106
103
  text-decoration: none !important;
107
104
  }
108
-
109
- .uk-link-toggle:focus { outline: none; }
110
105
 
111
106
 
112
107
  // Hooks
@@ -31,11 +31,9 @@ $marker-hover-color: $global-inverse-color !default
31
31
  @if(mixin-exists(hook-marker)) {@include hook-marker();}
32
32
  }
33
33
 
34
- /* Hover + Focus */
35
- .uk-marker:hover,
36
- .uk-marker:focus {
34
+ /* Hover */
35
+ .uk-marker:hover {
37
36
  color: $marker-hover-color;
38
- outline: none;
39
37
  @if(mixin-exists(hook-marker-hover)) {@include hook-marker-hover();}
40
38
  }
41
39
 
@@ -110,12 +110,6 @@ $internal-nav-parent-open-image: "data:image/svg+xml;charset=UTF-8,%3Csvg%20widt
110
110
  /* 4 */
111
111
  .uk-nav li > a > * { flex: none; }
112
112
 
113
- /*
114
- * Remove default focus style
115
- */
116
-
117
- .uk-nav li > a:focus { outline: none; }
118
-
119
113
  /*
120
114
  * Items
121
115
  * Must target `a` elements to exclude other elements (e.g. lists)
@@ -205,9 +199,8 @@ ul.uk-nav-sub {
205
199
  @if(mixin-exists(hook-nav-default-item)) {@include hook-nav-default-item();}
206
200
  }
207
201
 
208
- /* Hover + Focus */
209
- .uk-nav-default > li > a:hover,
210
- .uk-nav-default > li > a:focus {
202
+ /* Hover */
203
+ .uk-nav-default > li > a:hover {
211
204
  color: $nav-default-item-hover-color;
212
205
  @if(mixin-exists(hook-nav-default-item-hover)) {@include hook-nav-default-item-hover();}
213
206
  }
@@ -242,8 +235,7 @@ ul.uk-nav-sub {
242
235
 
243
236
  .uk-nav-default .uk-nav-sub a { color: $nav-default-sublist-item-color; }
244
237
 
245
- .uk-nav-default .uk-nav-sub a:hover,
246
- .uk-nav-default .uk-nav-sub a:focus { color: $nav-default-sublist-item-hover-color; }
238
+ .uk-nav-default .uk-nav-sub a:hover { color: $nav-default-sublist-item-hover-color; }
247
239
 
248
240
  .uk-nav-default .uk-nav-sub li.uk-active > a { color: $nav-default-sublist-item-active-color; }
249
241
 
@@ -266,9 +258,8 @@ ul.uk-nav-sub {
266
258
  @if(mixin-exists(hook-nav-primary-item)) {@include hook-nav-primary-item();}
267
259
  }
268
260
 
269
- /* Hover + Focus */
270
- .uk-nav-primary > li > a:hover,
271
- .uk-nav-primary > li > a:focus {
261
+ /* Hover */
262
+ .uk-nav-primary > li > a:hover {
272
263
  color: $nav-primary-item-hover-color;
273
264
  @if(mixin-exists(hook-nav-primary-item-hover)) {@include hook-nav-primary-item-hover();}
274
265
  }
@@ -303,8 +294,7 @@ ul.uk-nav-sub {
303
294
 
304
295
  .uk-nav-primary .uk-nav-sub a { color: $nav-primary-sublist-item-color; }
305
296
 
306
- .uk-nav-primary .uk-nav-sub a:hover,
307
- .uk-nav-primary .uk-nav-sub a:focus { color: $nav-primary-sublist-item-hover-color; }
297
+ .uk-nav-primary .uk-nav-sub a:hover { color: $nav-primary-sublist-item-hover-color; }
308
298
 
309
299
  .uk-nav-primary .uk-nav-sub li.uk-active > a { color: $nav-primary-sublist-item-active-color; }
310
300
 
@@ -246,14 +246,12 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
246
246
 
247
247
  /*
248
248
  * Hover
249
- * Apply hover style also to focus state and if dropdown is opened
249
+ * Apply hover style also if dropdown is opened
250
250
  */
251
251
 
252
252
  .uk-navbar-nav > li:hover > a,
253
- .uk-navbar-nav > li > a:focus,
254
253
  .uk-navbar-nav > li > a[aria-expanded="true"] {
255
254
  color: $navbar-nav-item-hover-color;
256
- outline: none;
257
255
  @if(mixin-exists(hook-navbar-nav-item-hover)) {@include hook-navbar-nav-item-hover();}
258
256
  }
259
257
 
@@ -294,10 +292,8 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
294
292
  }
295
293
 
296
294
  .uk-navbar-toggle:hover,
297
- .uk-navbar-toggle:focus,
298
295
  .uk-navbar-toggle[aria-expanded="true"] {
299
296
  color: $navbar-toggle-hover-color;
300
- outline: none;
301
297
  text-decoration: none;
302
298
  @if(mixin-exists(hook-navbar-toggle-hover)) {@include hook-navbar-toggle-hover();}
303
299
  }
@@ -311,9 +307,8 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
311
307
  @if(mixin-exists(hook-navbar-toggle-icon)) {@include hook-navbar-toggle-icon();}
312
308
  }
313
309
 
314
- /* Hover + Focus */
315
- :hover > .uk-navbar-toggle-icon,
316
- :focus > .uk-navbar-toggle-icon {
310
+ /* Hover */
311
+ :hover > .uk-navbar-toggle-icon {
317
312
  @if(mixin-exists(hook-navbar-toggle-icon-hover)) {@include hook-navbar-toggle-icon-hover();}
318
313
  }
319
314
 
@@ -435,9 +430,8 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
435
430
  @if(mixin-exists(hook-navbar-dropdown-nav-item)) {@include hook-navbar-dropdown-nav-item();}
436
431
  }
437
432
 
438
- /* Hover + Focus */
439
- .uk-navbar-dropdown-nav > li > a:hover,
440
- .uk-navbar-dropdown-nav > li > a:focus {
433
+ /* Hover */
434
+ .uk-navbar-dropdown-nav > li > a:hover {
441
435
  color: $navbar-dropdown-nav-item-hover-color;
442
436
  @if(mixin-exists(hook-navbar-dropdown-nav-item-hover)) {@include hook-navbar-dropdown-nav-item-hover();}
443
437
  }
@@ -472,8 +466,7 @@ $navbar-dropbar-z-index: $global-z-index - 20 !default;
472
466
 
473
467
  .uk-navbar-dropdown-nav .uk-nav-sub a { color: $navbar-dropdown-nav-sublist-item-color; }
474
468
 
475
- .uk-navbar-dropdown-nav .uk-nav-sub a:hover,
476
- .uk-navbar-dropdown-nav .uk-nav-sub a:focus { color: $navbar-dropdown-nav-sublist-item-hover-color; }
469
+ .uk-navbar-dropdown-nav .uk-nav-sub a:hover { color: $navbar-dropdown-nav-sublist-item-hover-color; }
477
470
 
478
471
  .uk-navbar-dropdown-nav .uk-nav-sub li.uk-active > a { color: $navbar-dropdown-nav-sublist-item-active-color; }
479
472
 
@@ -81,9 +81,8 @@ $pagination-item-disabled-color: $global-muted-color !default;
81
81
  @if(mixin-exists(hook-pagination-item)) {@include hook-pagination-item();}
82
82
  }
83
83
 
84
- /* Hover + Focus */
85
- .uk-pagination > * > :hover,
86
- .uk-pagination > * > :focus {
84
+ /* Hover */
85
+ .uk-pagination > * > :hover {
87
86
  color: $pagination-item-hover-color;
88
87
  text-decoration: $pagination-item-hover-text-decoration;
89
88
  @if(mixin-exists(hook-pagination-item-hover)) {@include hook-pagination-item-hover();}
@@ -39,12 +39,14 @@ $position-large-margin-l: 50px !default;
39
39
  Component: Position
40
40
  ========================================================================== */
41
41
 
42
+ :root { --uk-position-margin-offset: 0px; }
43
+
42
44
 
43
45
  /* Directions
44
46
  ========================================================================== */
45
47
 
46
48
  /*
47
- * 1. Prevent content overflow if `max-width: 100%` is used inside position container.
49
+ * 1. Prevent content overflow.
48
50
  */
49
51
 
50
52
  [class*='uk-position-top'],
@@ -54,14 +56,15 @@ $position-large-margin-l: 50px !default;
54
56
  [class*='uk-position-center'] {
55
57
  position: absolute !important;
56
58
  /* 1 */
57
- max-width: 100%;
59
+ max-width: unquote('calc(100% - (var(--uk-position-margin-offset) * 2))');
60
+ box-sizing: border-box;
58
61
  }
59
62
 
63
+ /*
64
+ * Edges
65
+ * Don't use `width: 100%` because it's wrong if the parent has padding.
66
+ */
60
67
 
61
- /* Edges
62
- ========================================================================== */
63
-
64
- /* Don't use `width: 100%` because it is wrong if the parent has padding. */
65
68
  .uk-position-top {
66
69
  top: 0;
67
70
  left: 0;
@@ -86,9 +89,9 @@ $position-large-margin-l: 50px !default;
86
89
  right: 0;
87
90
  }
88
91
 
89
-
90
- /* Corners
91
- ========================================================================== */
92
+ /*
93
+ * Corners
94
+ */
92
95
 
93
96
  .uk-position-top-left {
94
97
  top: 0;
@@ -113,23 +116,25 @@ $position-large-margin-l: 50px !default;
113
116
  /*
114
117
  * Center
115
118
  * 1. Fix text wrapping if content is larger than 50% of the container.
119
+ * Using `max-content` requires `max-width` of 100% which is set generally.
116
120
  */
117
121
 
118
122
  .uk-position-center {
119
- top: 50%;
120
- left: 50%;
121
- transform: translate(-50%,-50%);
123
+ top: unquote('calc(50% - var(--uk-position-margin-offset))');
124
+ left: unquote('calc(50% - var(--uk-position-margin-offset))');
125
+ --uk-position-translate-x: -50%;
126
+ --uk-position-translate-y: -50%;
127
+ transform: translate(var(--uk-position-translate-x), var(--uk-position-translate-y));
122
128
  /* 1 */
123
129
  width: max-content;
124
- max-width: 100%;
125
- box-sizing: border-box;
126
130
  }
127
131
 
128
132
  /* Vertical */
129
133
  [class*='uk-position-center-left'],
130
134
  [class*='uk-position-center-right'] {
131
- top: 50%;
132
- transform: translateY(-50%);
135
+ top: unquote('calc(50% - var(--uk-position-margin-offset))');
136
+ --uk-position-translate-y: -50%;
137
+ transform: translate(0, var(--uk-position-translate-y));
133
138
  }
134
139
 
135
140
  .uk-position-center-left { left: 0; }
@@ -148,20 +153,19 @@ $position-large-margin-l: 50px !default;
148
153
  /* Horizontal */
149
154
  .uk-position-top-center,
150
155
  .uk-position-bottom-center {
151
- left: 50%;
152
- transform: translateX(-50%);
156
+ left: unquote('calc(50% - var(--uk-position-margin-offset))');
157
+ --uk-position-translate-x: -50%;
158
+ transform: translate(var(--uk-position-translate-x), 0);
153
159
  /* 1 */
154
160
  width: max-content;
155
- max-width: 100%;
156
- box-sizing: border-box;
157
161
  }
158
162
 
159
163
  .uk-position-top-center { top: 0; }
160
164
  .uk-position-bottom-center { bottom: 0; }
161
165
 
162
-
163
- /* Cover
164
- ========================================================================== */
166
+ /*
167
+ * Cover
168
+ */
165
169
 
166
170
  .uk-position-cover {
167
171
  position: absolute;
@@ -172,89 +176,48 @@ $position-large-margin-l: 50px !default;
172
176
  }
173
177
 
174
178
 
175
- /* Utility
176
- ========================================================================== */
177
-
178
- .uk-position-relative { position: relative !important; }
179
-
180
- .uk-position-absolute { position: absolute !important; }
181
-
182
- .uk-position-fixed { position: fixed !important; }
183
-
184
- .uk-position-z-index { z-index: 1; }
185
-
186
-
187
- /* Margin modifier
179
+ /* Margin
188
180
  ========================================================================== */
189
181
 
190
- /*
191
- * Small
192
- */
193
-
194
182
  .uk-position-small {
195
- max-width: unquote('calc(100% - (#{$position-small-margin} * 2))');
196
183
  margin: $position-small-margin;
184
+ --uk-position-margin-offset: #{$position-small-margin};
197
185
  }
198
186
 
199
- .uk-position-small.uk-position-center { transform: translate(-50%, -50%) translate(-$position-small-margin, (-$position-small-margin)); }
200
-
201
- .uk-position-small[class*='uk-position-center-left'],
202
- .uk-position-small[class*='uk-position-center-right'] { transform: translateY(-50%) translateY(-$position-small-margin); }
203
-
204
- .uk-position-small.uk-position-top-center,
205
- .uk-position-small.uk-position-bottom-center { transform: translateX(-50%) translateX(-$position-small-margin); }
206
-
207
- /*
208
- * Medium
209
- */
210
-
211
187
  .uk-position-medium {
212
- max-width: unquote('calc(100% - (#{$position-medium-margin} * 2))');
213
188
  margin: $position-medium-margin;
189
+ --uk-position-margin-offset: #{$position-medium-margin};
214
190
  }
215
191
 
216
- .uk-position-medium.uk-position-center { transform: translate(-50%, -50%) translate(-$position-medium-margin, (-$position-medium-margin)); }
217
-
218
- .uk-position-medium[class*='uk-position-center-left'],
219
- .uk-position-medium[class*='uk-position-center-right'] { transform: translateY(-50%) translateY(-$position-medium-margin); }
220
-
221
- .uk-position-medium.uk-position-top-center,
222
- .uk-position-medium.uk-position-bottom-center { transform: translateX(-50%) translateX(-$position-medium-margin); }
223
-
224
- /*
225
- * Large
226
- */
227
-
228
192
  .uk-position-large {
229
- max-width: unquote('calc(100% - (#{$position-large-margin} * 2))');
230
193
  margin: $position-large-margin;
194
+ --uk-position-margin-offset: #{$position-large-margin};
231
195
  }
232
196
 
233
- .uk-position-large.uk-position-center { transform: translate(-50%, -50%) translate(-$position-large-margin, (-$position-large-margin)); }
234
-
235
- .uk-position-large[class*='uk-position-center-left'],
236
- .uk-position-large[class*='uk-position-center-right'] { transform: translateY(-50%) translateY(-$position-large-margin); }
237
-
238
- .uk-position-large.uk-position-top-center,
239
- .uk-position-large.uk-position-bottom-center { transform: translateX(-50%) translateX(-$position-large-margin); }
240
-
241
197
  /* Desktop and bigger */
242
198
  @media (min-width: $breakpoint-large) {
243
199
 
244
200
  .uk-position-large {
245
- max-width: unquote('calc(100% - (#{$position-large-margin-l} * 2))');
246
201
  margin: $position-large-margin-l;
202
+ --uk-position-margin-offset: #{$position-large-margin-l};
247
203
  }
248
204
 
249
- .uk-position-large.uk-position-center { transform: translate(-50%, -50%) translate(-$position-large-margin-l, (-$position-large-margin-l)); }
205
+ }
206
+
250
207
 
251
- .uk-position-large[class*='uk-position-center-left'],
252
- .uk-position-large[class*='uk-position-center-right'] { transform: translateY(-50%) translateY(-$position-large-margin-l); }
208
+ /* Schemes
209
+ ========================================================================== */
253
210
 
254
- .uk-position-large.uk-position-top-center,
255
- .uk-position-large.uk-position-bottom-center { transform: translateX(-50%) translateX(-$position-large-margin-l); }
211
+ .uk-position-relative { position: relative !important; }
212
+ .uk-position-absolute { position: absolute !important; }
213
+ .uk-position-fixed { position: fixed !important; }
214
+ .uk-position-sticky { position: sticky !important; }
256
215
 
257
- }
216
+
217
+ /* Layer
218
+ ========================================================================== */
219
+
220
+ .uk-position-z-index { z-index: 1; }
258
221
 
259
222
 
260
223
  // Hooks
@@ -133,12 +133,6 @@ $search-toggle-hover-color: $global-color !default;
133
133
  /* Icon (Adopts `uk-icon`)
134
134
  ========================================================================== */
135
135
 
136
- /*
137
- * Remove default focus style
138
- */
139
-
140
- .uk-search-icon:focus { outline: none; }
141
-
142
136
  /*
143
137
  * Position above input
144
138
  * 1. Set position
@@ -275,9 +269,8 @@ $search-toggle-hover-color: $global-color !default;
275
269
  @if(mixin-exists(hook-search-toggle)) {@include hook-search-toggle();}
276
270
  }
277
271
 
278
- /* Hover + Focus */
279
- .uk-search-toggle:hover,
280
- .uk-search-toggle:focus {
272
+ /* Hover */
273
+ .uk-search-toggle:hover {
281
274
  color: $search-toggle-hover-color;
282
275
  @if(mixin-exists(hook-search-toggle-hover)) {@include hook-search-toggle-hover();}
283
276
  }
@@ -40,11 +40,9 @@ $slidenav-large-padding-horizontal: $slidenav-large-padding-vertica
40
40
  @if(mixin-exists(hook-slidenav)) {@include hook-slidenav();}
41
41
  }
42
42
 
43
- /* Hover + Focus */
44
- .uk-slidenav:hover,
45
- .uk-slidenav:focus {
43
+ /* Hover */
44
+ .uk-slidenav:hover {
46
45
  color: $slidenav-hover-color;
47
- outline: none;
48
46
  @if(mixin-exists(hook-slidenav-hover)) {@include hook-slidenav-hover();}
49
47
  }
50
48
 
@@ -94,7 +94,6 @@ $slider-container-margin-right: -25px !default;
94
94
  * `max-width` needed to keep image responsiveness and prevent content overflow
95
95
  * 3. Create position context
96
96
  * 4. Disable horizontal panning gestures in IE11 and Edge
97
- * 5. Suppress outline on focus
98
97
  */
99
98
 
100
99
  .uk-slider-items > * {
@@ -107,9 +106,6 @@ $slider-container-margin-right: -25px !default;
107
106
  touch-action: pan-y;
108
107
  }
109
108
 
110
- /* 5 */
111
- .uk-slider-items > :focus { outline: none; }
112
-
113
109
 
114
110
  // Hooks
115
111
  // ========================================================================
@@ -59,7 +59,6 @@
59
59
  * 3. Clip child elements, e.g. for `uk-cover`
60
60
  * 4. Optimize animation
61
61
  * 5. Disable horizontal panning gestures in IE11 and Edge
62
- * 6. Suppress outline on focus
63
62
  */
64
63
 
65
64
  .uk-slideshow-items > * {
@@ -78,9 +77,6 @@
78
77
  touch-action: pan-y;
79
78
  }
80
79
 
81
- /* 6 */
82
- .uk-slideshow-items > :focus { outline: none; }
83
-
84
80
  /*
85
81
  * Hide not active items
86
82
  */
@@ -104,12 +104,10 @@ $subnav-item-disabled-color: $global-muted-color !default;
104
104
  @if(mixin-exists(hook-subnav-item)) {@include hook-subnav-item();}
105
105
  }
106
106
 
107
- /* Hover + Focus */
108
- .uk-subnav > * > a:hover,
109
- .uk-subnav > * > a:focus {
107
+ /* Hover */
108
+ .uk-subnav > * > a:hover {
110
109
  color: $subnav-item-hover-color;
111
110
  text-decoration: $subnav-item-hover-text-decoration;
112
- outline: none;
113
111
  @if(mixin-exists(hook-subnav-item-hover)) {@include hook-subnav-item-hover();}
114
112
  }
115
113
 
@@ -168,9 +166,8 @@ $subnav-item-disabled-color: $global-muted-color !default;
168
166
  @if(mixin-exists(hook-subnav-pill-item)) {@include hook-subnav-pill-item();}
169
167
  }
170
168
 
171
- /* Hover + Focus */
172
- .uk-subnav-pill > * > a:hover,
173
- .uk-subnav-pill > * > a:focus {
169
+ /* Hover */
170
+ .uk-subnav-pill > * > a:hover {
174
171
  background-color: $subnav-pill-item-hover-background;
175
172
  color: $subnav-pill-item-hover-color;
176
173
  @if(mixin-exists(hook-subnav-pill-item-hover)) {@include hook-subnav-pill-item-hover();}
@@ -90,9 +90,8 @@ $tab-item-disabled-color: $global-muted-color !default;
90
90
  @if(mixin-exists(hook-tab-item)) {@include hook-tab-item();}
91
91
  }
92
92
 
93
- /* Hover + Focus */
94
- .uk-tab > * > a:hover,
95
- .uk-tab > * > a:focus {
93
+ /* Hover */
94
+ .uk-tab > * > a:hover {
96
95
  color: $tab-item-hover-color;
97
96
  text-decoration: $tab-item-hover-text-decoration;
98
97
  @if(mixin-exists(hook-tab-item-hover)) {@include hook-tab-item-hover();}