uikit 3.16.27 → 3.17.1-dev.7c0766a6f

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 (119) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/build/less.js +5 -4
  3. package/build/util.js +7 -9
  4. package/dist/css/uikit-core-rtl.css +53 -18
  5. package/dist/css/uikit-core-rtl.min.css +1 -1
  6. package/dist/css/uikit-core.css +53 -18
  7. package/dist/css/uikit-core.min.css +1 -1
  8. package/dist/css/uikit-rtl.css +56 -17
  9. package/dist/css/uikit-rtl.min.css +1 -1
  10. package/dist/css/uikit.css +56 -17
  11. package/dist/css/uikit.min.css +1 -1
  12. package/dist/js/components/countdown.js +1 -1
  13. package/dist/js/components/countdown.min.js +1 -1
  14. package/dist/js/components/filter.js +24 -43
  15. package/dist/js/components/filter.min.js +1 -1
  16. package/dist/js/components/lightbox-panel.js +2 -3
  17. package/dist/js/components/lightbox-panel.min.js +1 -1
  18. package/dist/js/components/lightbox.js +2 -3
  19. package/dist/js/components/lightbox.min.js +1 -1
  20. package/dist/js/components/notification.js +2 -2
  21. package/dist/js/components/notification.min.js +1 -1
  22. package/dist/js/components/parallax.js +7 -17
  23. package/dist/js/components/parallax.min.js +1 -1
  24. package/dist/js/components/slider-parallax.js +6 -13
  25. package/dist/js/components/slider-parallax.min.js +1 -1
  26. package/dist/js/components/slider.js +2 -2
  27. package/dist/js/components/slider.min.js +1 -1
  28. package/dist/js/components/slideshow-parallax.js +6 -13
  29. package/dist/js/components/slideshow-parallax.min.js +1 -1
  30. package/dist/js/components/slideshow.js +19 -4
  31. package/dist/js/components/slideshow.min.js +1 -1
  32. package/dist/js/components/sortable.js +24 -43
  33. package/dist/js/components/sortable.min.js +1 -1
  34. package/dist/js/components/tooltip.js +1 -2
  35. package/dist/js/components/tooltip.min.js +1 -1
  36. package/dist/js/components/upload.js +1 -1
  37. package/dist/js/components/upload.min.js +1 -1
  38. package/dist/js/uikit-core.js +455 -185
  39. package/dist/js/uikit-core.min.js +1 -1
  40. package/dist/js/uikit-icons.js +1 -1
  41. package/dist/js/uikit-icons.min.js +1 -1
  42. package/dist/js/uikit.js +483 -240
  43. package/dist/js/uikit.min.js +1 -9502
  44. package/package.json +1 -1
  45. package/src/js/api/boot.js +2 -2
  46. package/src/js/api/computed.js +1 -1
  47. package/src/js/api/observables.js +1 -4
  48. package/src/js/components/notification.js +1 -1
  49. package/src/js/components/slideshow.js +19 -2
  50. package/src/js/core/cover.js +30 -1
  51. package/src/js/core/drop.js +15 -9
  52. package/src/js/core/dropnav.js +16 -2
  53. package/src/js/core/grid.js +119 -64
  54. package/src/js/core/height-viewport.js +4 -1
  55. package/src/js/core/margin.js +23 -39
  56. package/src/js/core/navbar.js +219 -1
  57. package/src/js/core/scrollspy-nav.js +13 -4
  58. package/src/js/core/scrollspy.js +1 -1
  59. package/src/js/core/sticky.js +10 -11
  60. package/src/js/mixin/internal/animate-fade.js +1 -11
  61. package/src/js/mixin/internal/slideshow-animations.js +1 -1
  62. package/src/js/mixin/slider-reactive.js +1 -1
  63. package/src/js/mixin/togglable.js +0 -2
  64. package/src/js/util/animation.js +19 -13
  65. package/src/js/util/class.js +30 -26
  66. package/src/js/util/dom.js +3 -8
  67. package/src/js/util/filter.js +2 -6
  68. package/src/js/util/viewport.js +26 -4
  69. package/src/less/components/base.less +6 -3
  70. package/src/less/components/form.less +3 -0
  71. package/src/less/components/heading.less +18 -0
  72. package/src/less/components/navbar.less +6 -12
  73. package/src/less/components/pagination.less +13 -6
  74. package/src/less/components/position.less +1 -0
  75. package/src/less/components/section.less +6 -0
  76. package/src/less/theme/heading.less +4 -0
  77. package/src/less/theme/navbar.less +5 -0
  78. package/src/scss/components/base.scss +4 -2
  79. package/src/scss/components/form.scss +3 -0
  80. package/src/scss/components/heading.scss +13 -0
  81. package/src/scss/components/navbar.scss +5 -12
  82. package/src/scss/components/pagination.scss +13 -6
  83. package/src/scss/components/position.scss +1 -0
  84. package/src/scss/components/section.scss +4 -0
  85. package/src/scss/mixins-theme.scss +13 -1
  86. package/src/scss/mixins.scss +8 -1
  87. package/src/scss/theme/heading.scss +4 -0
  88. package/src/scss/variables-theme.scss +7 -0
  89. package/src/scss/variables.scss +7 -0
  90. package/tests/cover.html +2 -2
  91. package/tests/drop.html +13 -7
  92. package/tests/dropnav.html +22 -10
  93. package/tests/filter.html +5 -5
  94. package/tests/form.html +1 -1
  95. package/tests/grid-masonry.html +49 -73
  96. package/tests/grid-parallax.html +82 -40
  97. package/tests/grid.html +21 -3
  98. package/tests/heading.html +33 -4
  99. package/tests/height-viewport.html +3 -3
  100. package/tests/height.html +2 -2
  101. package/tests/icon.html +1 -1
  102. package/tests/image.html +6 -6
  103. package/tests/leader.html +3 -3
  104. package/tests/nav.html +1 -1
  105. package/tests/navbar.html +28 -10
  106. package/tests/notification.html +1 -1
  107. package/tests/offcanvas.html +2 -2
  108. package/tests/parallax.html +1 -1
  109. package/tests/scrollspy.html +3 -3
  110. package/tests/sortable.html +3 -3
  111. package/tests/sticky-navbar.html +233 -14
  112. package/tests/sticky.html +8 -8
  113. package/tests/svg.html +1 -1
  114. package/tests/tab.html +1 -1
  115. package/tests/toggle.html +2 -2
  116. package/tests/tooltip.html +2 -2
  117. package/tests/upload.html +16 -16
  118. package/tests/utility.html +2 -2
  119. package/tests/video.html +3 -3
@@ -156,7 +156,8 @@
156
156
  .uk-heading-medium,
157
157
  .uk-heading-large,
158
158
  .uk-heading-xlarge,
159
- .uk-heading-2xlarge {
159
+ .uk-heading-2xlarge,
160
+ .uk-heading-3xlarge {
160
161
  color: $inverse-base-heading-color;
161
162
  @if(mixin-exists(hook-inverse-base-heading)) {@include hook-inverse-base-heading();}
162
163
  }
@@ -732,6 +733,7 @@
732
733
  @mixin hook-heading-large(){}
733
734
  @mixin hook-heading-xlarge(){}
734
735
  @mixin hook-heading-2xlarge(){}
736
+ @mixin hook-heading-3xlarge(){}
735
737
  @mixin hook-heading-primary(){}
736
738
  @mixin hook-heading-hero(){}
737
739
  @mixin hook-heading-divider(){}
@@ -743,6 +745,7 @@
743
745
  @mixin hook-inverse-heading-large(){}
744
746
  @mixin hook-inverse-heading-xlarge(){}
745
747
  @mixin hook-inverse-heading-2xlarge(){}
748
+ @mixin hook-inverse-heading-3xlarge(){}
746
749
  @mixin hook-inverse-heading-primary(){}
747
750
  @mixin hook-inverse-heading-hero(){}
748
751
  @mixin hook-inverse-heading-divider(){}
@@ -770,6 +773,10 @@
770
773
  @if(mixin-exists(hook-inverse-heading-2xlarge)) {@include hook-inverse-heading-2xlarge();}
771
774
  }
772
775
 
776
+ .uk-heading-3xlarge {
777
+ @if(mixin-exists(hook-inverse-heading-3xlarge)) {@include hook-inverse-heading-3xlarge();}
778
+ }
779
+
773
780
  @if ($deprecated == true) { .uk-heading-primary { @if (mixin-exists(hook-inverse-heading-primary)) {@include hook-inverse-heading-primary();}}}
774
781
 
775
782
  @if ($deprecated == true) { .uk-heading-hero { @if (mixin-exists(hook-inverse-heading-hero)) {@include hook-inverse-heading-hero();}}}
@@ -21,6 +21,8 @@
21
21
 
22
22
  // @mixin hook-heading-2xlarge(){}
23
23
 
24
+ // @mixin hook-heading-3xlarge(){}
25
+
24
26
 
25
27
  // Divider
26
28
  // ========================================================================
@@ -60,6 +62,8 @@
60
62
 
61
63
  // @mixin hook-inverse-heading-2xlarge(){}
62
64
 
65
+ // @mixin hook-inverse-heading-3xlarge(){}
66
+
63
67
  // @mixin hook-inverse-heading-divider(){}
64
68
 
65
69
  // @mixin hook-inverse-heading-bullet(){}
@@ -515,12 +515,16 @@ $heading-xlarge-font-size-m: $heading-large-font-size-l !default;
515
515
  $heading-2xlarge-font-size: $heading-xlarge-font-size-m !default;
516
516
  $heading-xlarge-font-size-l: 8rem !default;
517
517
  $heading-2xlarge-font-size-m: $heading-xlarge-font-size-l !default;
518
+ $heading-3xlarge-font-size: $heading-2xlarge-font-size-m !default;
518
519
  $heading-2xlarge-font-size-l: 11rem !default;
520
+ $heading-3xlarge-font-size-m: $heading-2xlarge-font-size-l !default;
521
+ $heading-3xlarge-font-size-l: 15rem !default;
519
522
  $heading-small-line-height: 1.2 !default;
520
523
  $heading-medium-line-height: 1.1 !default;
521
524
  $heading-large-line-height: 1.1 !default;
522
525
  $heading-xlarge-line-height: 1 !default;
523
526
  $heading-2xlarge-line-height: 1 !default;
527
+ $heading-3xlarge-line-height: 1 !default;
524
528
  $heading-divider-padding-bottom: unquote('calc(5px + 0.1em)') !default;
525
529
  $heading-divider-border-width: unquote('calc(0.2px + 0.05em)') !default;
526
530
  $heading-divider-border: $global-border !default;
@@ -837,6 +841,7 @@ $navbar-dropdown-nav-divider-border: $global-border !default;
837
841
  $navbar-dropdown-nav-sublist-item-color: $global-muted-color !default;
838
842
  $navbar-dropdown-nav-sublist-item-hover-color: $global-color !default;
839
843
  $navbar-dropdown-nav-sublist-item-active-color: $global-emphasis-color !default;
844
+ $navbar-dropbar-behind-color-mode: dark !default;
840
845
  $inverse-navbar-nav-item-color: $inverse-global-muted-color !default;
841
846
  $inverse-navbar-nav-item-hover-color: $inverse-global-color !default;
842
847
  $inverse-navbar-nav-item-onclick-color: $inverse-global-emphasis-color !default;
@@ -948,7 +953,9 @@ $section-large-padding-vertical-m: $global-xlarge-margin !default;
948
953
  $section-xlarge-padding-vertical: $global-xlarge-margin !default;
949
954
  $section-xlarge-padding-vertical-m: ($global-large-margin + $global-xlarge-margin) !default;
950
955
  $section-default-background: $global-background !default;
956
+ $section-default-color-mode: dark !default;
951
957
  $section-muted-background: $global-muted-background !default;
958
+ $section-muted-color-mode: dark !default;
952
959
  $section-primary-background: $global-primary-background !default;
953
960
  $section-primary-color-mode: light !default;
954
961
  $section-secondary-background: $global-secondary-background !default;
@@ -513,12 +513,16 @@ $heading-xlarge-font-size-m: $heading-large-font-size-l !default;
513
513
  $heading-2xlarge-font-size: $heading-xlarge-font-size-m !default;
514
514
  $heading-xlarge-font-size-l: 8rem !default;
515
515
  $heading-2xlarge-font-size-m: $heading-xlarge-font-size-l !default;
516
+ $heading-3xlarge-font-size: $heading-2xlarge-font-size-m !default;
516
517
  $heading-2xlarge-font-size-l: 11rem !default;
518
+ $heading-3xlarge-font-size-m: $heading-2xlarge-font-size-l !default;
519
+ $heading-3xlarge-font-size-l: 15rem !default;
517
520
  $heading-small-line-height: 1.2 !default;
518
521
  $heading-medium-line-height: 1.1 !default;
519
522
  $heading-large-line-height: 1.1 !default;
520
523
  $heading-xlarge-line-height: 1 !default;
521
524
  $heading-2xlarge-line-height: 1 !default;
525
+ $heading-3xlarge-line-height: 1 !default;
522
526
  $heading-divider-padding-bottom: unquote('calc(5px + 0.1em)') !default;
523
527
  $heading-divider-border-width: unquote('calc(0.2px + 0.05em)') !default;
524
528
  $heading-divider-border: $global-border !default;
@@ -835,6 +839,7 @@ $navbar-dropdown-nav-divider-border: $global-border !default;
835
839
  $navbar-dropdown-nav-sublist-item-color: $global-muted-color !default;
836
840
  $navbar-dropdown-nav-sublist-item-hover-color: $global-color !default;
837
841
  $navbar-dropdown-nav-sublist-item-active-color: $global-emphasis-color !default;
842
+ $navbar-dropbar-behind-color-mode: dark !default;
838
843
  $inverse-navbar-nav-item-color: $inverse-global-muted-color !default;
839
844
  $inverse-navbar-nav-item-hover-color: $inverse-global-color !default;
840
845
  $inverse-navbar-nav-item-onclick-color: $inverse-global-emphasis-color !default;
@@ -946,7 +951,9 @@ $section-large-padding-vertical-m: $global-xlarge-margin !default;
946
951
  $section-xlarge-padding-vertical: $global-xlarge-margin !default;
947
952
  $section-xlarge-padding-vertical-m: ($global-large-margin + $global-xlarge-margin) !default;
948
953
  $section-default-background: $global-background !default;
954
+ $section-default-color-mode: dark !default;
949
955
  $section-muted-background: $global-muted-background !default;
956
+ $section-muted-color-mode: dark !default;
950
957
  $section-primary-background: $global-primary-background !default;
951
958
  $section-primary-color-mode: light !default;
952
959
  $section-secondary-background: $global-secondary-background !default;
package/tests/cover.html CHANGED
@@ -154,13 +154,13 @@
154
154
  <tr>
155
155
  <td><code>width</code></td>
156
156
  <td>Number</td>
157
- <td>undefined</td>
157
+ <td></td>
158
158
  <td>The element's width.</td>
159
159
  </tr>
160
160
  <tr>
161
161
  <td><code>height</code></td>
162
162
  <td>Number</td>
163
- <td>undefined</td>
163
+ <td></td>
164
164
  <td>The element's height.</td>
165
165
  </tr>
166
166
  </tbody>
package/tests/drop.html CHANGED
@@ -609,26 +609,26 @@
609
609
  <tr>
610
610
  <td><code>toggle</code></td>
611
611
  <td>CSS Selector</td>
612
- <td>'- *'</td>
612
+ <td>- *</td>
613
613
  <td>CSS selector for the element to be used as toggle. By default, the preceding element.</td>
614
614
  </tr>
615
615
  <tr>
616
616
  <td><code>pos</code></td>
617
617
  <td>String</td>
618
- <td>'bottom-left'</td>
618
+ <td>bottom-left</td>
619
619
  <td>Drop position.</td>
620
620
  </tr>
621
621
  <tr>
622
622
  <td><code>stretch</code></td>
623
- <td>false|true|'x'|'y'</td>
623
+ <td>Boolean, String</td>
624
624
  <td>false</td>
625
- <td>Stretch drop on both (true) or given axis.</td>
625
+ <td>Stretch drop on both (true) or given axis (x,y).</td>
626
626
  </tr>
627
627
  <tr>
628
628
  <td><code>mode</code></td>
629
- <td>hover | click</td>
629
+ <td>String</td>
630
630
  <td>click,hover</td>
631
- <td>Comma-separated list of drop trigger behavior modes.</td>
631
+ <td>Comma-separated list of drop trigger behavior modes (hover, click).</td>
632
632
  </tr>
633
633
  <tr>
634
634
  <td><code>delay-show</code></td>
@@ -711,7 +711,7 @@
711
711
  <tr>
712
712
  <td><code>animation</code></td>
713
713
  <td>String</td>
714
- <td>'uk-animation-fade'</td>
714
+ <td>uk-animation-fade</td>
715
715
  <td>Space-separated names of animations. Comma-separated for animation out.</td>
716
716
  </tr>
717
717
  <tr>
@@ -726,6 +726,12 @@
726
726
  <td>true</td>
727
727
  <td>Allow background scrolling while drop is opened.</td>
728
728
  </tr>
729
+ <tr>
730
+ <td><code>close-on-scroll</code></td>
731
+ <td>Boolean</td>
732
+ <td>false</td>
733
+ <td>Close the drop on scrolling a parent scroll container.</td>
734
+ </tr>
729
735
  <tr>
730
736
  <td><code>duration</code></td>
731
737
  <td>Number</td>
@@ -710,9 +710,9 @@
710
710
  <tbody>
711
711
  <tr>
712
712
  <td><code>align</code></td>
713
- <td>left|right|center</td>
713
+ <td>String</td>
714
714
  <td>left</td>
715
- <td>Drop alignment.</td>
715
+ <td>Drop alignment (left, right, center).</td>
716
716
  </tr>
717
717
  <tr>
718
718
  <td><code>boundary</code></td>
@@ -722,13 +722,13 @@
722
722
  </tr>
723
723
  <tr>
724
724
  <td><code>dropbar</code></td>
725
- <td>Boolean | CSS selector</td>
725
+ <td>Boolean, CSS selector</td>
726
726
  <td>false</td>
727
727
  <td>The dropbar selector. If true the dropbar will be inserted automatically.</td>
728
728
  </tr>
729
729
  <tr>
730
730
  <td><code>dropbar-anchor</code></td>
731
- <td>Boolean | CSS selector</td>
731
+ <td>Boolean, CSS selector</td>
732
732
  <td>false</td>
733
733
  <td>The dropbar anchor selector. If set, dropbar will be inserted after the anchor element.</td>
734
734
  </tr>
@@ -746,15 +746,15 @@
746
746
  </tr>
747
747
  <tr>
748
748
  <td><code>stretch</code></td>
749
- <td>false|true|'x'|'y'</td>
750
- <td>false</td>
751
- <td>Stretch drop on both (true) or given axis.</td>
749
+ <td>Boolean, String</td>
750
+ <td>true</td>
751
+ <td>Stretch drop on both (true) or given axis (x,y).</td>
752
752
  </tr>
753
753
  <tr>
754
754
  <td><code>mode</code></td>
755
- <td>hover | click</td>
755
+ <td>String</td>
756
756
  <td>click,hover</td>
757
- <td>Comma-separated list of drop trigger behavior modes.</td>
757
+ <td>Comma-separated list of drop trigger behavior modes (hover, click).</td>
758
758
  </tr>
759
759
  <tr>
760
760
  <td><code>delay-show</code></td>
@@ -795,7 +795,7 @@
795
795
  <tr>
796
796
  <td><code>animation</code></td>
797
797
  <td>String</td>
798
- <td>'uk-animation-fade'</td>
798
+ <td>uk-animation-fade</td>
799
799
  <td>Space-separated names of animations. Comma-separated for animation out.</td>
800
800
  </tr>
801
801
  <tr>
@@ -804,6 +804,18 @@
804
804
  <td>false</td>
805
805
  <td>Use animation when closing the drop.</td>
806
806
  </tr>
807
+ <tr>
808
+ <td><code>bg-scroll</code></td>
809
+ <td>Boolean</td>
810
+ <td>true</td>
811
+ <td>Allow background scrolling while drop is opened.</td>
812
+ </tr>
813
+ <tr>
814
+ <td><code>close-on-scroll</code></td>
815
+ <td>Boolean</td>
816
+ <td>false</td>
817
+ <td>Closes the drop on scrolling a parent scroll container.</td>
818
+ </tr>
807
819
  </tbody>
808
820
  </table>
809
821
  </div>
package/tests/filter.html CHANGED
@@ -128,7 +128,7 @@
128
128
  </div>
129
129
  </div>
130
130
 
131
- <ul class="js-filter uk-child-width-1-2 uk-child-width-1-4@m uk-light" uk-grid="masonry: true">
131
+ <ul class="js-filter uk-child-width-1-2 uk-child-width-1-4@m uk-light" uk-grid="masonry: next">
132
132
  <li color="blue" size="large" date="2016-06-01"><div class="uk-panel uk-flex uk-flex-center uk-flex-middle uk-h2">1</div></li>
133
133
  <li color="red" size="small" date="2016-12-13"><div class="uk-panel uk-flex uk-flex-center uk-flex-middle uk-h2">2</div></li>
134
134
  <li color="blue" size="medium" date="2017-05-20"><div class="uk-panel uk-flex uk-flex-center uk-flex-middle uk-h2">3</div></li>
@@ -223,7 +223,7 @@
223
223
  </div>
224
224
  </div>
225
225
 
226
- <ul class="js-filter uk-child-width-1-2 uk-child-width-1-4@m uk-light" uk-grid="masonry: true; parallax: 200">
226
+ <ul class="js-filter uk-child-width-1-2 uk-child-width-1-4@m uk-light" uk-grid="masonry: next; parallax: 200">
227
227
  <li color="blue" size="large" date="2016-06-01"><div class="uk-panel uk-flex uk-flex-center uk-flex-middle uk-h2">1</div></li>
228
228
  <li color="red" size="small" date="2016-12-13"><div class="uk-panel uk-flex uk-flex-center uk-flex-middle uk-h2">2</div></li>
229
229
  <li color="blue" size="medium" date="2017-05-20"><div class="uk-panel uk-flex uk-flex-center uk-flex-middle uk-h2">3</div></li>
@@ -256,12 +256,12 @@
256
256
  <tr>
257
257
  <td><code>target</code></td>
258
258
  <td>String</td>
259
- <td>''</td>
259
+ <td></td>
260
260
  <td>The targeted list on which to apply the filter to.</td>
261
261
  </tr>
262
262
  <tr>
263
263
  <td><code>selActive</code></td>
264
- <td>String|Boolean</td>
264
+ <td>String, Boolean</td>
265
265
  <td>false</td>
266
266
  <td>A selector for the initially active filter controls.</td>
267
267
  </tr>
@@ -273,7 +273,7 @@
273
273
  </tr>
274
274
  <tr>
275
275
  <td><code>duration</code></td>
276
- <td>String|Boolean</td>
276
+ <td>String, Boolean</td>
277
277
  <td>250</td>
278
278
  <td>Animation duration in milliseconds.</td>
279
279
  </tr>
package/tests/form.html CHANGED
@@ -608,7 +608,7 @@
608
608
  <tbody>
609
609
  <tr>
610
610
  <td><code>target</code></td>
611
- <td>CSS selector | Boolean</td>
611
+ <td>CSS selector, Boolean</td>
612
612
  <td>false</td>
613
613
  <td>Value display target.</td>
614
614
  </tr>
@@ -8,13 +8,15 @@
8
8
  <script src="js/test.js"></script>
9
9
  <style>
10
10
 
11
- :nth-child(7n-6) > .uk-panel { height: 120px; background: rgba(0,0,0,0.1); }
12
- :nth-child(7n-5) > .uk-panel { height: 180px; background: rgba(0,0,0,0.15); }
13
- :nth-child(7n-4) > .uk-panel { height: 200px; background: rgba(0,0,0,0.2); }
14
- :nth-child(7n-3) > .uk-panel { height: 170px; background: rgba(0,0,0,0.25); }
15
- :nth-child(7n-2) > .uk-panel { height: 220px; background: rgba(0,0,0,0.3); }
16
- :nth-child(7n-1) > .uk-panel { height: 160px; background: rgba(0,0,0,0.35); }
17
- :nth-child(7n) > .uk-panel { height: 250px; background: rgba(0,0,0,0.35); }
11
+ :nth-child(9n-8) > .uk-panel { height: 140px; background: rgba(0,0,0,0.1); }
12
+ :nth-child(9n-7) > .uk-panel { height: 180px; background: rgba(0,0,0,0.1); }
13
+ :nth-child(9n-6) > .uk-panel { height: 220px; background: rgba(0,0,0,0.1); }
14
+ :nth-child(9n-5) > .uk-panel { height: 280px; background: rgba(0,0,0,0.15); }
15
+ :nth-child(9n-4) > .uk-panel { height: 140px; background: rgba(0,0,0,0.2); }
16
+ :nth-child(9n-3) > .uk-panel { height: 200px; background: rgba(0,0,0,0.25); }
17
+ :nth-child(9n-2) > .uk-panel { height: 250px; background: rgba(0,0,0,0.3); }
18
+ :nth-child(9n-1) > .uk-panel { height: 320px; background: rgba(0,0,0,0.35); }
19
+ :nth-child(9n) > .uk-panel { height: 160px; background: rgba(0,0,0,0.35); }
18
20
 
19
21
  </style>
20
22
  </head>
@@ -25,80 +27,54 @@
25
27
 
26
28
  <h1>Grid Masonry</h1>
27
29
 
28
- <div class="uk-child-width-1-2@s uk-child-width-1-3@m uk-child-width-1-4@l" uk-grid="masonry: true">
29
- <div><div class="uk-panel"></div></div>
30
- <div><div class="uk-panel"></div></div>
31
- <div><div class="uk-panel"></div></div>
32
- <div><div class="uk-panel"></div></div>
33
- <div><div class="uk-panel"></div></div>
34
- <div><div class="uk-panel"></div></div>
35
- <div><div class="uk-panel"></div></div>
36
- <div><div class="uk-panel"></div></div>
37
- <div><div class="uk-panel"></div></div>
38
- <div><div class="uk-panel"></div></div>
39
- <div><div class="uk-panel"></div></div>
40
- <div><div class="uk-panel"></div></div>
30
+ <div class="uk-margin">
31
+ <select id="js-masonry-switcher" class="uk-select uk-form-width-small" aria-label="Masonry switcher">
32
+ <option value="pack">Pack</option>
33
+ <option value="next">Next</option>
34
+ </select>
41
35
  </div>
42
36
 
43
- <h1>With Parallax</h1>
44
-
45
- <div class="uk-child-width-1-2@s uk-child-width-1-3@m uk-child-width-1-4@l" uk-grid="masonry: true; parallax: 150">
46
- <div><div class="uk-panel"></div></div>
47
- <div><div class="uk-panel"></div></div>
48
- <div><div class="uk-panel"></div></div>
49
- <div><div class="uk-panel"></div></div>
50
- <div><div class="uk-panel"></div></div>
51
- <div><div class="uk-panel"></div></div>
52
- <div><div class="uk-panel"></div></div>
53
- <div><div class="uk-panel"></div></div>
54
- <div><div class="uk-panel"></div></div>
55
- <div><div class="uk-panel"></div></div>
56
- <div><div class="uk-panel"></div></div>
57
- <div><div class="uk-panel"></div></div>
37
+ <div class="uk-child-width-1-2@s uk-child-width-1-3@m uk-child-width-1-4@l uk-light js-grid-masonry" uk-grid masonry="pack">
38
+ <div><div class="uk-panel"><h1 class="uk-position-center">1</h1></div></div>
39
+ <div><div class="uk-panel"><h1 class="uk-position-center">2</h1></div></div>
40
+ <div><div class="uk-panel"><h1 class="uk-position-center">3</h1></div></div>
41
+ <div><div class="uk-panel"><h1 class="uk-position-center">4</h1></div></div>
42
+ <div><div class="uk-panel"><h1 class="uk-position-center">5</h1></div></div>
43
+ <div><div class="uk-panel"><h1 class="uk-position-center">6</h1></div></div>
44
+ <div><div class="uk-panel"><h1 class="uk-position-center">7</h1></div></div>
45
+ <div><div class="uk-panel"><h1 class="uk-position-center">8</h1></div></div>
46
+ <div><div class="uk-panel"><h1 class="uk-position-center">9</h1></div></div>
47
+ <div><div class="uk-panel"><h1 class="uk-position-center">10</h1></div></div>
48
+ <div><div class="uk-panel"><h1 class="uk-position-center">11</h1></div></div>
49
+ <div><div class="uk-panel"><h1 class="uk-position-center">12</h1></div></div>
58
50
  </div>
59
51
 
60
- <h2>JavaScript Options</h2>
52
+ <h2>With Parallax</h2>
61
53
 
62
- <div class="uk-overflow-auto">
63
- <table class="uk-table uk-table-striped">
64
- <thead>
65
- <tr>
66
- <th>Option</th>
67
- <th>Value</th>
68
- <th>Default</th>
69
- <th>Description</th>
70
- </tr>
71
- </thead>
72
- <tbody>
73
- <tr>
74
- <td><code>margin</code></td>
75
- <td>String</td>
76
- <td>uk-grid-margin</td>
77
- <td>This class is added to items that break into the next row, typically to create margin to the previous row.</td>
78
- </tr>
79
- <tr>
80
- <td><code>first-column</code></td>
81
- <td>String</td>
82
- <td>uk-first-column</td>
83
- <td>This class is added to the first element in each row.</td>
84
- </tr>
85
- <tr>
86
- <td><code>masonry</code></td>
87
- <td>Boolean</td>
88
- <td>false</td>
89
- <td>Enables masonry layout for this grid.</td>
90
- </tr>
91
- <tr>
92
- <td><code>parallax</code></td>
93
- <td>Number</td>
94
- <td>0</td>
95
- <td>Parallax translation value. The value must be a positive integer. Falsy disables the parallax effect (default).</td>
96
- </tr>
97
- </tbody>
98
- </table>
54
+ <div class="uk-child-width-1-2@s uk-child-width-1-3@m uk-child-width-1-4@l uk-light js-grid-masonry" uk-grid="parallax: 150" masonry="pack">
55
+ <div><div class="uk-panel"><h1 class="uk-position-center">1</h1></div></div>
56
+ <div><div class="uk-panel"><h1 class="uk-position-center">2</h1></div></div>
57
+ <div><div class="uk-panel"><h1 class="uk-position-center">3</h1></div></div>
58
+ <div><div class="uk-panel"><h1 class="uk-position-center">4</h1></div></div>
59
+ <div><div class="uk-panel"><h1 class="uk-position-center">5</h1></div></div>
60
+ <div><div class="uk-panel"><h1 class="uk-position-center">6</h1></div></div>
61
+ <div><div class="uk-panel"><h1 class="uk-position-center">7</h1></div></div>
62
+ <div><div class="uk-panel"><h1 class="uk-position-center">8</h1></div></div>
63
+ <div><div class="uk-panel"><h1 class="uk-position-center">9</h1></div></div>
64
+ <div><div class="uk-panel"><h1 class="uk-position-center">10</h1></div></div>
65
+ <div><div class="uk-panel"><h1 class="uk-position-center">11</h1></div></div>
66
+ <div><div class="uk-panel"><h1 class="uk-position-center">12</h1></div></div>
99
67
  </div>
100
68
 
101
69
  </div>
102
70
 
71
+ <script>
72
+ const {attr, $$, on} = UIkit.util;
73
+ on('#js-masonry-switcher', 'change', e =>
74
+ attr($$('.js-grid-masonry'), 'masonry', e.target.value)
75
+ );
76
+
77
+ </script>
78
+
103
79
  </body>
104
80
  </html>
@@ -18,6 +18,16 @@
18
18
 
19
19
  .test { background: rgba(0,0,0,0.05); }
20
20
 
21
+ .js-grid-parallax :nth-child(9n-8) > .uk-panel { height: 240px; background: rgba(0,0,0,0.1); }
22
+ .js-grid-parallax :nth-child(9n-7) > .uk-panel { height: 380px; background: rgba(0,0,0,0.1); }
23
+ .js-grid-parallax :nth-child(9n-6) > .uk-panel { height: 400px; background: rgba(0,0,0,0.1); }
24
+ .js-grid-parallax :nth-child(9n-5) > .uk-panel { height: 480px; background: rgba(0,0,0,0.15); }
25
+ .js-grid-parallax :nth-child(9n-4) > .uk-panel { height: 260px; background: rgba(0,0,0,0.2); }
26
+ .js-grid-parallax :nth-child(9n-3) > .uk-panel { height: 400px; background: rgba(0,0,0,0.25); }
27
+ .js-grid-parallax :nth-child(9n-2) > .uk-panel { height: 450px; background: rgba(0,0,0,0.3); }
28
+ .js-grid-parallax :nth-child(9n-1) > .uk-panel { height: 520px; background: rgba(0,0,0,0.35); }
29
+ .js-grid-parallax :nth-child(9n) > .uk-panel { height: 280px; background: rgba(0,0,0,0.35); }
30
+
21
31
  </style>
22
32
  </head>
23
33
 
@@ -64,7 +74,7 @@
64
74
  <h2>Multi-row</h2>
65
75
 
66
76
  <div class="test">
67
- <div class="uk-child-width-1-2@ uk-child-width-1-3@m uk-child-width-1-3@l" uk-grid="parallax: 200">
77
+ <div class="uk-child-width-1-2@ uk-child-width-1-3@m uk-child-width-1-3@l" uk-grid="parallax: 150">
68
78
  <div><div class="uk-panel"></div></div>
69
79
  <div><div class="uk-panel"></div></div>
70
80
  <div><div class="uk-panel"></div></div>
@@ -82,48 +92,80 @@
82
92
  </div>
83
93
  </div>
84
94
 
85
- <h2>JavaScript Options</h2>
86
-
87
- <div class="uk-overflow-auto">
88
- <table class="uk-table uk-table-striped">
89
- <thead>
90
- <tr>
91
- <th>Option</th>
92
- <th>Value</th>
93
- <th>Default</th>
94
- <th>Description</th>
95
- </tr>
96
- </thead>
97
- <tbody>
98
- <tr>
99
- <td><code>margin</code></td>
100
- <td>String</td>
101
- <td>uk-grid-margin</td>
102
- <td>This class is added to items that break into the next row, typically to create margin to the previous row.</td>
103
- </tr>
104
- <tr>
105
- <td><code>first-column</code></td>
106
- <td>String</td>
107
- <td>uk-first-column</td>
108
- <td>This class is added to the first element in each row.</td>
109
- </tr>
110
- <tr>
111
- <td><code>masonry</code></td>
112
- <td>Boolean</td>
113
- <td>false</td>
114
- <td>Enables masonry layout for this grid.</td>
115
- </tr>
116
- <tr>
117
- <td><code>parallax</code></td>
118
- <td>Number</td>
119
- <td>0</td>
120
- <td>Parallax translation value. The value must be a positive integer. Falsy disables the parallax effect (default).</td>
121
- </tr>
122
- </tbody>
123
- </table>
95
+ <h2>With Masonry</h2>
96
+
97
+ <div class="uk-margin uk-form-stacked">
98
+ <div class="uk-inline">
99
+ <label class="uk-form-label" for="js-parallax-switcher">Parallax</label>
100
+ <input id="js-parallax-switcher" class="uk-input uk-form-width-small" type="text" value="0">
101
+ </div>
102
+ <div class="uk-inline">
103
+ <label class="uk-form-label" for="js-parallax-start-switcher">Start</label>
104
+ <input id="js-parallax-start-switcher" class="uk-input uk-form-width-small" type="text" value="0">
105
+ </div>
106
+ <div class="uk-inline">
107
+ <label class="uk-form-label" for="js-parallax-end-switcher">End</label>
108
+ <input id="js-parallax-end-switcher" class="uk-input uk-form-width-small" type="text" value="0">
109
+ </div>
110
+ <div class="uk-inline">
111
+ <label class="uk-form-label" for="js-parallax-justify-switcher">Justify</label>
112
+ <select id="js-parallax-justify-switcher" class="uk-select uk-form-width-small">
113
+ <option value="false">False</option>
114
+ <option value="true" selected>True</option>
115
+ </select>
116
+ </div>
117
+ <div class="uk-inline">
118
+ <label class="uk-form-label" for="js-masonry-switcher">Masonry</label>
119
+ <select id="js-masonry-switcher" class="uk-select uk-form-width-small">
120
+ <option value="pack">Pack</option>
121
+ <option value="next">Next</option>
122
+ </select>
123
+ </div>
124
+ </div>
125
+
126
+ <div class="test" style="margin-bottom: 100vh">
127
+ <div class="uk-child-width-1-2@s uk-child-width-1-3@m uk-child-width-1-4@l uk-light js-grid-parallax" uk-grid parallax="0" parallax-justify="true" masonry="pack">
128
+ <div><div class="uk-panel"><h1 class="uk-position-center">1</h1></div></div>
129
+ <div><div class="uk-panel"><h1 class="uk-position-center">2</h1></div></div>
130
+ <div><div class="uk-panel"><h1 class="uk-position-center">3</h1></div></div>
131
+ <div><div class="uk-panel"><h1 class="uk-position-center">4</h1></div></div>
132
+ <div><div class="uk-panel"><h1 class="uk-position-center">5</h1></div></div>
133
+ <div><div class="uk-panel"><h1 class="uk-position-center">6</h1></div></div>
134
+ <div><div class="uk-panel"><h1 class="uk-position-center">7</h1></div></div>
135
+ <div><div class="uk-panel"><h1 class="uk-position-center">8</h1></div></div>
136
+ <div><div class="uk-panel"><h1 class="uk-position-center">9</h1></div></div>
137
+ <div><div class="uk-panel"><h1 class="uk-position-center">10</h1></div></div>
138
+ <div><div class="uk-panel"><h1 class="uk-position-center">11</h1></div></div>
139
+ <div><div class="uk-panel"><h1 class="uk-position-center">12</h1></div></div>
140
+ </div>
124
141
  </div>
125
142
 
126
143
  </div>
127
144
 
145
+ <script>
146
+ const {attr, $$, on} = UIkit.util;
147
+
148
+ on('#js-parallax-switcher', 'change', e =>
149
+ attr($$('.js-grid-parallax'), 'parallax', e.target.value)
150
+ );
151
+
152
+ on('#js-parallax-start-switcher', 'change', e =>
153
+ attr($$('.js-grid-parallax'), 'parallax-start', e.target.value)
154
+ );
155
+
156
+ on('#js-parallax-end-switcher', 'change', e =>
157
+ attr($$('.js-grid-parallax'), 'parallax-end', e.target.value)
158
+ );
159
+
160
+ on('#js-parallax-justify-switcher', 'change', e =>
161
+ attr($$('.js-grid-parallax'), 'parallax-justify', e.target.value)
162
+ );
163
+
164
+ on('#js-masonry-switcher', 'change', e =>
165
+ attr($$('.js-grid-parallax'), 'masonry', e.target.value)
166
+ );
167
+
168
+ </script>
169
+
128
170
  </body>
129
171
  </html>