uikit-rails 0.0.2 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -3
  3. data/Gemfile +2 -1
  4. data/LICENSE.txt +21 -0
  5. data/README.md +65 -0
  6. data/Rakefile +0 -1
  7. data/assets/fonts/FontAwesome.otf +0 -0
  8. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  9. data/assets/fonts/fontawesome-webfont.woff +0 -0
  10. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  11. data/assets/javascripts/components/accordion.js +174 -0
  12. data/assets/javascripts/components/accordion.min.js +2 -0
  13. data/assets/javascripts/components/autocomplete.js +334 -0
  14. data/assets/javascripts/components/autocomplete.min.js +2 -0
  15. data/assets/javascripts/components/datepicker.js +3166 -0
  16. data/assets/javascripts/components/datepicker.min.js +3 -0
  17. data/assets/javascripts/components/form-password.js +67 -0
  18. data/assets/javascripts/components/form-password.min.js +2 -0
  19. data/assets/javascripts/components/form-select.js +70 -0
  20. data/assets/javascripts/components/form-select.min.js +2 -0
  21. data/assets/javascripts/components/grid.js +527 -0
  22. data/assets/javascripts/components/grid.min.js +2 -0
  23. data/assets/javascripts/components/htmleditor.js +623 -0
  24. data/assets/javascripts/components/htmleditor.min.js +2 -0
  25. data/assets/javascripts/components/lightbox.js +555 -0
  26. data/assets/javascripts/components/lightbox.min.js +2 -0
  27. data/assets/javascripts/components/nestable.js +638 -0
  28. data/assets/javascripts/components/nestable.min.js +2 -0
  29. data/assets/javascripts/components/notify.js +189 -0
  30. data/assets/javascripts/components/notify.min.js +2 -0
  31. data/assets/javascripts/components/pagination.js +147 -0
  32. data/assets/javascripts/components/pagination.min.js +2 -0
  33. data/assets/javascripts/components/parallax.js +435 -0
  34. data/assets/javascripts/components/parallax.min.js +2 -0
  35. data/assets/javascripts/components/search.js +92 -0
  36. data/assets/javascripts/components/search.min.js +2 -0
  37. data/assets/javascripts/components/slider.js +531 -0
  38. data/assets/javascripts/components/slider.min.js +2 -0
  39. data/assets/javascripts/components/slideset.js +506 -0
  40. data/assets/javascripts/components/slideset.min.js +2 -0
  41. data/assets/javascripts/components/slideshow-fx.js +375 -0
  42. data/assets/javascripts/components/slideshow-fx.min.js +2 -0
  43. data/assets/javascripts/components/slideshow.js +562 -0
  44. data/assets/javascripts/components/slideshow.min.js +2 -0
  45. data/assets/javascripts/components/sortable.js +688 -0
  46. data/assets/javascripts/components/sortable.min.js +2 -0
  47. data/assets/javascripts/components/sticky.js +359 -0
  48. data/assets/javascripts/components/sticky.min.js +2 -0
  49. data/assets/javascripts/components/timepicker.js +192 -0
  50. data/assets/javascripts/components/timepicker.min.js +2 -0
  51. data/assets/javascripts/components/tooltip.js +234 -0
  52. data/assets/javascripts/components/tooltip.min.js +2 -0
  53. data/assets/javascripts/components/upload.js +260 -0
  54. data/assets/javascripts/components/upload.min.js +2 -0
  55. data/assets/javascripts/core/alert.js +66 -0
  56. data/assets/javascripts/core/alert.min.js +2 -0
  57. data/assets/javascripts/core/button.js +157 -0
  58. data/assets/javascripts/core/button.min.js +2 -0
  59. data/assets/javascripts/core/core.js +730 -0
  60. data/assets/javascripts/core/core.min.js +2 -0
  61. data/assets/javascripts/core/cover.js +95 -0
  62. data/assets/javascripts/core/cover.min.js +2 -0
  63. data/assets/javascripts/core/dropdown.js +514 -0
  64. data/assets/javascripts/core/dropdown.min.js +2 -0
  65. data/assets/javascripts/core/grid.js +114 -0
  66. data/assets/javascripts/core/grid.min.js +2 -0
  67. data/assets/javascripts/core/modal.js +384 -0
  68. data/assets/javascripts/core/modal.min.js +2 -0
  69. data/assets/javascripts/core/nav.js +136 -0
  70. data/assets/javascripts/core/nav.min.js +2 -0
  71. data/assets/javascripts/core/offcanvas.js +180 -0
  72. data/assets/javascripts/core/offcanvas.min.js +2 -0
  73. data/assets/javascripts/core/scrollspy.js +208 -0
  74. data/assets/javascripts/core/scrollspy.min.js +2 -0
  75. data/assets/javascripts/core/smooth-scroll.js +62 -0
  76. data/assets/javascripts/core/smooth-scroll.min.js +2 -0
  77. data/assets/javascripts/core/switcher.js +309 -0
  78. data/assets/javascripts/core/switcher.min.js +2 -0
  79. data/assets/javascripts/core/tab.js +167 -0
  80. data/assets/javascripts/core/tab.min.js +2 -0
  81. data/assets/javascripts/core/toggle.js +120 -0
  82. data/assets/javascripts/core/toggle.min.js +2 -0
  83. data/assets/javascripts/core/touch.js +175 -0
  84. data/assets/javascripts/core/touch.min.js +2 -0
  85. data/assets/javascripts/core/utility.js +289 -0
  86. data/assets/javascripts/core/utility.min.js +2 -0
  87. data/assets/javascripts/uikit-components.js +23 -0
  88. data/assets/javascripts/uikit.js +3706 -0
  89. data/assets/javascripts/uikit.min.js +3 -0
  90. data/assets/stylesheets/components/accordion.scss +94 -0
  91. data/assets/stylesheets/components/autocomplete.scss +102 -0
  92. data/assets/stylesheets/components/datepicker.scss +197 -0
  93. data/assets/stylesheets/components/dotnav.scss +212 -0
  94. data/assets/stylesheets/components/form-advanced.scss +128 -0
  95. data/assets/stylesheets/components/form-file.scss +63 -0
  96. data/assets/stylesheets/components/form-password.scss +74 -0
  97. data/assets/stylesheets/components/form-select.scss +66 -0
  98. data/assets/stylesheets/components/htmleditor.scss +269 -0
  99. data/assets/stylesheets/components/nestable.scss +229 -0
  100. data/assets/stylesheets/components/notify.scss +190 -0
  101. data/assets/stylesheets/components/placeholder.scss +66 -0
  102. data/assets/stylesheets/components/progress.scss +173 -0
  103. data/assets/stylesheets/components/search.scss +309 -0
  104. data/assets/stylesheets/components/slidenav.scss +183 -0
  105. data/assets/stylesheets/components/slider.scss +131 -0
  106. data/assets/stylesheets/components/slideshow.scss +208 -0
  107. data/assets/stylesheets/components/sortable.scss +122 -0
  108. data/assets/stylesheets/components/sticky.scss +64 -0
  109. data/assets/stylesheets/components/tooltip.scss +177 -0
  110. data/assets/stylesheets/components/upload.scss +34 -0
  111. data/assets/stylesheets/core/alert.scss +141 -0
  112. data/assets/stylesheets/core/animation.scss +599 -0
  113. data/assets/stylesheets/core/article.scss +139 -0
  114. data/assets/stylesheets/core/badge.scss +110 -0
  115. data/assets/stylesheets/core/base-noconflict.scss +397 -0
  116. data/assets/stylesheets/core/base.scss +541 -0
  117. data/assets/stylesheets/core/block.scss +153 -0
  118. data/assets/stylesheets/core/breadcrumb.scss +86 -0
  119. data/assets/stylesheets/core/button.scss +406 -0
  120. data/assets/stylesheets/core/close.scss +132 -0
  121. data/assets/stylesheets/core/column.scss +209 -0
  122. data/assets/stylesheets/core/comment.scss +172 -0
  123. data/assets/stylesheets/core/contrast.scss +493 -0
  124. data/assets/stylesheets/core/cover.scss +70 -0
  125. data/assets/stylesheets/core/description-list.scss +71 -0
  126. data/assets/stylesheets/core/dropdown.scss +280 -0
  127. data/assets/stylesheets/core/flex.scss +320 -0
  128. data/assets/stylesheets/core/form.scss +627 -0
  129. data/assets/stylesheets/core/grid.scss +688 -0
  130. data/assets/stylesheets/core/icon.scss +897 -0
  131. data/assets/stylesheets/core/list.scss +102 -0
  132. data/assets/stylesheets/core/modal.scss +341 -0
  133. data/assets/stylesheets/core/nav.scss +468 -0
  134. data/assets/stylesheets/core/navbar.scss +325 -0
  135. data/assets/stylesheets/core/offcanvas.scss +168 -0
  136. data/assets/stylesheets/core/overlay.scss +534 -0
  137. data/assets/stylesheets/core/pagination.scss +197 -0
  138. data/assets/stylesheets/core/panel.scss +332 -0
  139. data/assets/stylesheets/core/print.scss +59 -0
  140. data/assets/stylesheets/core/subnav.scss +213 -0
  141. data/assets/stylesheets/core/switcher.scss +38 -0
  142. data/assets/stylesheets/core/tab.scss +368 -0
  143. data/assets/stylesheets/core/table.scss +147 -0
  144. data/assets/stylesheets/core/text.scss +128 -0
  145. data/assets/stylesheets/core/thumbnail.scss +122 -0
  146. data/assets/stylesheets/core/thumbnav.scss +122 -0
  147. data/assets/stylesheets/core/utility.scss +606 -0
  148. data/assets/stylesheets/core/variables.scss +23 -0
  149. data/assets/stylesheets/uikit-components.scss +22 -0
  150. data/assets/stylesheets/uikit-mixins.scss +327 -0
  151. data/assets/stylesheets/uikit-variables.scss +817 -0
  152. data/assets/stylesheets/uikit.scss +56 -0
  153. data/lib/uikit-rails.rb +2 -2
  154. data/lib/uikit-rails/engine.rb +11 -1
  155. data/lib/uikit-rails/version.rb +1 -3
  156. data/uikit-rails.gemspec +15 -16
  157. metadata +169 -44
  158. data/README.rb +0 -1
  159. data/vendor/assets/javascripts/ui.card.js +0 -115
  160. data/vendor/assets/javascripts/ui.color-picker.js +0 -351
  161. data/vendor/assets/javascripts/ui.confirmation.js +0 -133
  162. data/vendor/assets/javascripts/ui.dialog.js +0 -252
  163. data/vendor/assets/javascripts/ui.emitter.js +0 -99
  164. data/vendor/assets/javascripts/ui.js +0 -1641
  165. data/vendor/assets/javascripts/ui.menu.js +0 -238
  166. data/vendor/assets/javascripts/ui.notification.js +0 -240
  167. data/vendor/assets/javascripts/ui.overlay.js +0 -79
  168. data/vendor/assets/javascripts/ui.split-button.js +0 -108
  169. data/vendor/assets/stylesheets/ui.card.css +0 -55
  170. data/vendor/assets/stylesheets/ui.color-picker.css +0 -6
  171. data/vendor/assets/stylesheets/ui.confirmation.css +0 -7
  172. data/vendor/assets/stylesheets/ui.css +0 -337
  173. data/vendor/assets/stylesheets/ui.dialog.css +0 -92
  174. data/vendor/assets/stylesheets/ui.menu.css +0 -32
  175. data/vendor/assets/stylesheets/ui.notification.css +0 -107
  176. data/vendor/assets/stylesheets/ui.overlay.css +0 -16
  177. data/vendor/assets/stylesheets/ui.split-button.css +0 -27
@@ -0,0 +1,122 @@
1
+ // Name: Sortable
2
+ // Description: Defines styles for sortable grids and lists
3
+ //
4
+ // Component: `uk-sortable`
5
+ //
6
+ // Sub-objects: `uk-sortable-handle`
7
+ // `uk-sortable-moving`
8
+ //
9
+ // Modifier: `uk-sortable-dragged`
10
+ // `uk-sortable-placeholder`
11
+ //
12
+ // Markup:
13
+ //
14
+ // <!-- uk-sortable -->
15
+ // <ul class="uk-sortable" data-uk-sortable>
16
+ // <li></li>
17
+ // <li></li>
18
+ // </ul>
19
+ //
20
+ // ========================================================================
21
+
22
+
23
+ // Variables
24
+ // ========================================================================
25
+
26
+ $sortable-dragged-z-index: 1050 !default;
27
+
28
+ $sortable-placeholder-opacity: 0 !default;
29
+
30
+ $sortable-empty-height: 30px !default;
31
+
32
+
33
+ /* ========================================================================
34
+ Component: Sortable
35
+ ========================================================================== */
36
+
37
+ .uk-sortable {
38
+ position: relative;
39
+ @include hook-sortable();
40
+ }
41
+
42
+ /*
43
+ * Deactivate browser touch actions in IE11
44
+ */
45
+
46
+ .uk-sortable > * { touch-action: none; }
47
+
48
+ /*
49
+ * Disables the default callout shown when you touch and hold a touch target
50
+ * Currently only works in Webkit
51
+ */
52
+
53
+ .uk-sortable a,
54
+ .uk-sortable img { -webkit-touch-callout: none; }
55
+
56
+ /*
57
+ * Remove margin from the last-child
58
+ */
59
+
60
+ .uk-sortable > :last-child { margin-bottom: 0; }
61
+
62
+
63
+ /* Sub-modifier `uk-sortable-dragged`
64
+ ========================================================================== */
65
+
66
+ .uk-sortable-dragged {
67
+ position: absolute;
68
+ z-index: $sortable-dragged-z-index;
69
+ pointer-events: none;
70
+ @include hook-sortable-dragged();
71
+ }
72
+
73
+
74
+ /* Sub-modifier `uk-sortable-placeholder`
75
+ ========================================================================== */
76
+
77
+ .uk-sortable-placeholder {
78
+ opacity: $sortable-placeholder-opacity;
79
+ @include hook-sortable-placeholder();
80
+ }
81
+
82
+
83
+ /* Empty List
84
+ ========================================================================== */
85
+
86
+ .uk-sortable-empty {
87
+ min-height: $sortable-empty-height;
88
+ @include hook-sortable-empty();
89
+ }
90
+
91
+
92
+ /* Sub-object `uk-sortable-handle`
93
+ ========================================================================== */
94
+
95
+ /*
96
+ * Deactivate browser touch actions in IE11
97
+ */
98
+
99
+ .uk-sortable-handle { touch-action: none; }
100
+
101
+ /* Hover */
102
+ .uk-sortable-handle:hover { cursor: move; }
103
+
104
+
105
+ /* Sub-object `uk-sortable-moving`
106
+ ========================================================================== */
107
+
108
+ .uk-sortable-moving,
109
+ /* Needed if moving over links or buttons */
110
+ .uk-sortable-moving * { cursor: move; }
111
+
112
+
113
+ // Hooks
114
+ // ========================================================================
115
+
116
+ @include hook-sortable-misc();
117
+
118
+ // @mixin hook-sortable(){}
119
+ // @mixin hook-sortable-dragged(){}
120
+ // @mixin hook-sortable-placeholder(){}
121
+ // @mixin hook-sortable-empty(){}
122
+ // @mixin hook-sortable-misc(){}
@@ -0,0 +1,64 @@
1
+ // Name: Sticky
2
+ // Description: Make elements remain at the top of the viewport
3
+ //
4
+ // Component: `data-uk-sticky`
5
+ //
6
+ // States: `uk-active`
7
+ //
8
+ // ========================================================================
9
+
10
+
11
+ // Variables
12
+ // ========================================================================
13
+
14
+ $sticky-z-index: 980 !default;
15
+
16
+ $sticky-animation-duration: 0.2s !default;
17
+ $sticky-reverse-animation-duration: 0.2s !default;
18
+
19
+
20
+ /* ========================================================================
21
+ Component: Sticky
22
+ ========================================================================== */
23
+
24
+ /*
25
+ * 1. More robust if padding and border are used
26
+ */
27
+
28
+ [data-uk-sticky].uk-active {
29
+ z-index: $sticky-z-index;
30
+ /* 1 */
31
+ box-sizing: border-box;
32
+ }
33
+
34
+ /*
35
+ * 1. Resolve frame-rate issues on devices with lower frame-rates. Forces hardware acceleration
36
+ */
37
+
38
+ .uk-sticky-placeholder > * {
39
+ /* 1 */
40
+ -webkit-backface-visibility: hidden;
41
+ backface-visibility: hidden;
42
+ }
43
+
44
+ /*
45
+ * Faster animations
46
+ */
47
+
48
+ [data-uk-sticky][class*='uk-animation-'] {
49
+ -webkit-animation-duration: $sticky-animation-duration;
50
+ animation-duration: $sticky-animation-duration;
51
+ }
52
+
53
+ [data-uk-sticky].uk-animation-reverse {
54
+ -webkit-animation-duration: $sticky-reverse-animation-duration;
55
+ animation-duration: $sticky-reverse-animation-duration;
56
+ }
57
+
58
+
59
+ // Hooks
60
+ // ========================================================================
61
+
62
+ @include hook-sticky-misc();
63
+
64
+ // @mixin hook-sticky-misc(){}
@@ -0,0 +1,177 @@
1
+ // Name: Tooltip
2
+ // Description: Defines styles for tooltips
3
+ //
4
+ // Component: `uk-tooltip`
5
+ //
6
+ // Modifiers `uk-tooltip-top`
7
+ // `uk-tooltip-top-left`
8
+ // `uk-tooltip-top-right`
9
+ // `uk-tooltip-bottom`
10
+ // `uk-tooltip-bottom-left`
11
+ // `uk-tooltip-bottom-right`
12
+ // `uk-tooltip-left`
13
+ // `uk-tooltip-right`
14
+ //
15
+ // ========================================================================
16
+
17
+
18
+ // Variables
19
+ // ========================================================================
20
+
21
+ $tooltip-z-index: 1030 !default;
22
+ $tooltip-max-width: 200px !default;
23
+ $tooltip-padding-vertical: 5px !default;
24
+ $tooltip-padding-horizontal: 8px !default;
25
+ $tooltip-background: #333 !default;
26
+ $tooltip-triangle-size: 5px !default;
27
+
28
+ $tooltip-color: rgba(255,255,255,0.7) !default;
29
+ $tooltip-font-size: 12px !default;
30
+ $tooltip-line-height: 18px !default;
31
+
32
+ $tooltip-offset-horizontal: 10px !default;
33
+
34
+
35
+ /* ========================================================================
36
+ Component: Tooltip
37
+ ========================================================================== */
38
+
39
+ /*
40
+ * 1. Hide by default
41
+ * 2. Set fixed position
42
+ * 3. Set dimensions
43
+ * 4. Set style
44
+ */
45
+
46
+ .uk-tooltip {
47
+ /* 1 */
48
+ display: none;
49
+ /* 2 */
50
+ position: absolute;
51
+ z-index: $tooltip-z-index;
52
+ /* 3 */
53
+ box-sizing: border-box;
54
+ max-width: $tooltip-max-width;
55
+ padding: $tooltip-padding-vertical $tooltip-padding-horizontal;
56
+ /* 4 */
57
+ background: $tooltip-background;
58
+ color: $tooltip-color;
59
+ font-size: $tooltip-font-size;
60
+ line-height: $tooltip-line-height;
61
+ @include hook-tooltip();
62
+ }
63
+
64
+
65
+ /* Triangle
66
+ ========================================================================== */
67
+
68
+ /*
69
+ * 1. Dashed is less antialised than solid
70
+ */
71
+
72
+ .uk-tooltip:after {
73
+ content: "";
74
+ display: block;
75
+ position: absolute;
76
+ width: 0;
77
+ height: 0;
78
+ /* 1 */
79
+ border: $tooltip-triangle-size dashed $tooltip-background;
80
+ }
81
+
82
+
83
+ /* Direction modifiers
84
+ ========================================================================== */
85
+
86
+ /*
87
+ * Top
88
+ */
89
+
90
+ .uk-tooltip-top:after,
91
+ .uk-tooltip-top-left:after,
92
+ .uk-tooltip-top-right:after {
93
+ bottom: -$tooltip-triangle-size;
94
+ border-top-style: solid;
95
+ border-bottom: none;
96
+ border-left-color: transparent;
97
+ border-right-color: transparent;
98
+ border-top-color: $tooltip-background;
99
+ }
100
+
101
+ /*
102
+ * Bottom
103
+ */
104
+
105
+ .uk-tooltip-bottom:after,
106
+ .uk-tooltip-bottom-left:after,
107
+ .uk-tooltip-bottom-right:after {
108
+ top: -$tooltip-triangle-size;
109
+ border-bottom-style: solid;
110
+ border-top: none;
111
+ border-left-color: transparent;
112
+ border-right-color: transparent;
113
+ border-bottom-color: $tooltip-background;
114
+ }
115
+
116
+ /*
117
+ * Top/Bottom center
118
+ */
119
+
120
+ .uk-tooltip-top:after,
121
+ .uk-tooltip-bottom:after {
122
+ left: 50%;
123
+ margin-left: -$tooltip-triangle-size;
124
+ }
125
+
126
+ /*
127
+ * Top/Bottom left
128
+ */
129
+
130
+ .uk-tooltip-top-left:after,
131
+ .uk-tooltip-bottom-left:after { left: $tooltip-offset-horizontal; }
132
+
133
+ /*
134
+ * Top/Bottom right
135
+ */
136
+
137
+ .uk-tooltip-top-right:after,
138
+ .uk-tooltip-bottom-right:after { right: $tooltip-offset-horizontal; }
139
+
140
+ /*
141
+ * Left
142
+ */
143
+
144
+ .uk-tooltip-left:after {
145
+ right: -$tooltip-triangle-size;
146
+ top: 50%;
147
+ margin-top: -$tooltip-triangle-size;
148
+ border-left-style: solid;
149
+ border-right: none;
150
+ border-top-color: transparent;
151
+ border-bottom-color: transparent;
152
+ border-left-color: $tooltip-background;
153
+ }
154
+
155
+ /*
156
+ * Right
157
+ */
158
+
159
+ .uk-tooltip-right:after {
160
+ left: -$tooltip-triangle-size;
161
+ top: 50%;
162
+ margin-top: -$tooltip-triangle-size;
163
+ border-right-style: solid;
164
+ border-left: none;
165
+ border-top-color: transparent;
166
+ border-bottom-color: transparent;
167
+ border-right-color: $tooltip-background;
168
+ }
169
+
170
+
171
+ // Hooks
172
+ // ========================================================================
173
+
174
+ @include hook-tooltip-misc();
175
+
176
+ // @mixin hook-tooltip(){}
177
+ // @mixin hook-tooltip-misc(){}
@@ -0,0 +1,34 @@
1
+ // Name: Upload
2
+ // Description: Provides a dragover state for uploads
3
+ //
4
+ // Component: `uk-upload`
5
+ //
6
+ // States: `uk-dragover`
7
+ //
8
+ // ========================================================================
9
+
10
+
11
+ // Variables
12
+ // ========================================================================
13
+
14
+ $uk-upload-dragover-box-shadow: rgba(100,100,100,0.3) !default;
15
+ $uk-upload-dragover-box-shadow-blur: 20px !default;
16
+
17
+
18
+ /* ========================================================================
19
+ Component: Upload
20
+ ========================================================================== */
21
+
22
+ /*
23
+ * Create a box-shadow when dragging a file over the upload area
24
+ */
25
+
26
+ .uk-dragover { box-shadow: 0 0 $uk-upload-dragover-box-shadow-blur $uk-upload-dragover-box-shadow; }
27
+
28
+
29
+ // Hooks
30
+ // ========================================================================
31
+
32
+ @include hook-upload-misc();
33
+
34
+ // @mixin hook-upload-misc(){}
@@ -0,0 +1,141 @@
1
+ // Name: Alert
2
+ // Description: Defines styles for alert messages
3
+ //
4
+ // Component: `uk-alert`
5
+ //
6
+ // Sub-objects: `uk-alert-close`
7
+ //
8
+ // Modifiers: `uk-alert-success`
9
+ // `uk-alert-warning`
10
+ // `uk-alert-danger`
11
+ // `uk-alert-large`
12
+ //
13
+ // Uses: Close: `uk-close`
14
+ //
15
+ // Markup:
16
+ //
17
+ // <!-- uk-alert -->
18
+ // <div class="uk-alert" data-uk-alert>
19
+ // <a href="#" class="uk-alert-close uk-close"></a>
20
+ // <p></p>
21
+ // </div>
22
+ //
23
+ // ========================================================================
24
+
25
+
26
+ // Variables
27
+ // ========================================================================
28
+
29
+ $alert-margin-vertical: 15px !default;
30
+ $alert-padding: 10px !default;
31
+ $alert-background: #ebf7fd !default;
32
+ $alert-color: #2d7091 !default;
33
+
34
+ $alert-success-background: #f2fae3 !default;
35
+ $alert-success-color: #659f13 !default;
36
+
37
+ $alert-warning-background: #fffceb !default;
38
+ $alert-warning-color: #e28327 !default;
39
+
40
+ $alert-danger-background: #fff1f0 !default;
41
+ $alert-danger-color: #d85030 !default;
42
+
43
+ $alert-large-padding: 20px !default;
44
+
45
+
46
+ /* ========================================================================
47
+ Component: Alert
48
+ ========================================================================== */
49
+
50
+ .uk-alert {
51
+ margin-bottom: $alert-margin-vertical;
52
+ padding: $alert-padding;
53
+ background: $alert-background;
54
+ color: $alert-color;
55
+ @include hook-alert();
56
+ }
57
+
58
+ /*
59
+ * Add margin if adjacent element
60
+ */
61
+
62
+ * + .uk-alert { margin-top: $alert-margin-vertical; }
63
+
64
+ /*
65
+ * Remove margin from the last-child
66
+ */
67
+
68
+ .uk-alert > :last-child { margin-bottom: 0; }
69
+
70
+ /*
71
+ * Keep color for headings if the default heading color is changed
72
+ */
73
+
74
+ .uk-alert h1,
75
+ .uk-alert h2,
76
+ .uk-alert h3,
77
+ .uk-alert h4,
78
+ .uk-alert h5,
79
+ .uk-alert h6 { color: inherit; }
80
+
81
+
82
+ /* Close in alert
83
+ ========================================================================== */
84
+
85
+ .uk-alert > .uk-close:first-child { float: right; }
86
+
87
+ /*
88
+ * Remove margin from adjacent element
89
+ */
90
+
91
+ .uk-alert > .uk-close:first-child + * { margin-top: 0; }
92
+
93
+
94
+ /* Modifier: `uk-alert-success`
95
+ ========================================================================== */
96
+
97
+ .uk-alert-success {
98
+ background: $alert-success-background;
99
+ color: $alert-success-color;
100
+ @include hook-alert-success();
101
+ }
102
+
103
+
104
+ /* Modifier: `uk-alert-warning`
105
+ ========================================================================== */
106
+
107
+ .uk-alert-warning {
108
+ background: $alert-warning-background;
109
+ color: $alert-warning-color;
110
+ @include hook-alert-warning();
111
+ }
112
+
113
+
114
+ /* Modifier: `uk-alert-danger`
115
+ ========================================================================== */
116
+
117
+ .uk-alert-danger {
118
+ background: $alert-danger-background;
119
+ color: $alert-danger-color;
120
+ @include hook-alert-danger();
121
+ }
122
+
123
+
124
+ /* Modifier: `uk-alert-large`
125
+ ========================================================================== */
126
+
127
+ .uk-alert-large { padding: $alert-large-padding; }
128
+
129
+ .uk-alert-large > .uk-close:first-child { margin: -10px -10px 0 0; }
130
+
131
+
132
+ // Hooks
133
+ // ========================================================================
134
+
135
+ @include hook-alert-misc();
136
+
137
+ // @mixin hook-alert(){}
138
+ // @mixin hook-alert-success(){}
139
+ // @mixin hook-alert-warning(){}
140
+ // @mixin hook-alert-danger(){}
141
+ // @mixin hook-alert-misc(){}