uikit3-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (293) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +5 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +41 -0
  7. data/Rakefile +10 -0
  8. data/assets/images/backgrounds/accordion-close.svg +4 -0
  9. data/assets/images/backgrounds/accordion-open.svg +3 -0
  10. data/assets/images/backgrounds/divider-icon.svg +3 -0
  11. data/assets/images/backgrounds/form-checkbox-indeterminate.svg +3 -0
  12. data/assets/images/backgrounds/form-checkbox.svg +3 -0
  13. data/assets/images/backgrounds/form-radio.svg +3 -0
  14. data/assets/images/backgrounds/form-select.svg +4 -0
  15. data/assets/images/backgrounds/list-bullet.svg +3 -0
  16. data/assets/images/backgrounds/nav-parent-close.svg +3 -0
  17. data/assets/images/backgrounds/nav-parent-open.svg +3 -0
  18. data/assets/images/components/close-large.svg +4 -0
  19. data/assets/images/components/close.svg +4 -0
  20. data/assets/images/components/navbar-toggle.svg +5 -0
  21. data/assets/images/components/overlay.svg +4 -0
  22. data/assets/images/components/pagination-next.svg +3 -0
  23. data/assets/images/components/pagination-previous.svg +3 -0
  24. data/assets/images/components/search-default.svg +4 -0
  25. data/assets/images/components/search-large.svg +4 -0
  26. data/assets/images/components/search-navbar.svg +4 -0
  27. data/assets/images/components/slidenav-large-next.svg +3 -0
  28. data/assets/images/components/slidenav-large-previous.svg +3 -0
  29. data/assets/images/components/slidenav-next.svg +3 -0
  30. data/assets/images/components/slidenav-previous.svg +3 -0
  31. data/assets/images/components/spinner.svg +3 -0
  32. data/assets/images/components/totop.svg +3 -0
  33. data/assets/images/symbols/album.svg +5 -0
  34. data/assets/images/symbols/arrow-down.svg +4 -0
  35. data/assets/images/symbols/arrow-left.svg +4 -0
  36. data/assets/images/symbols/arrow-right.svg +4 -0
  37. data/assets/images/symbols/arrow-up.svg +4 -0
  38. data/assets/images/symbols/ban.svg +4 -0
  39. data/assets/images/symbols/behance.svg +5 -0
  40. data/assets/images/symbols/bell.svg +4 -0
  41. data/assets/images/symbols/bold.svg +3 -0
  42. data/assets/images/symbols/bolt.svg +3 -0
  43. data/assets/images/symbols/bookmark.svg +3 -0
  44. data/assets/images/symbols/calendar.svg +5 -0
  45. data/assets/images/symbols/camera.svg +4 -0
  46. data/assets/images/symbols/cart.svg +5 -0
  47. data/assets/images/symbols/check.svg +3 -0
  48. data/assets/images/symbols/chevron-down.svg +3 -0
  49. data/assets/images/symbols/chevron-left.svg +3 -0
  50. data/assets/images/symbols/chevron-right.svg +3 -0
  51. data/assets/images/symbols/chevron-up.svg +3 -0
  52. data/assets/images/symbols/clock.svg +5 -0
  53. data/assets/images/symbols/close.svg +4 -0
  54. data/assets/images/symbols/cloud-download.svg +5 -0
  55. data/assets/images/symbols/cloud-upload.svg +5 -0
  56. data/assets/images/symbols/code.svg +4 -0
  57. data/assets/images/symbols/cog.svg +4 -0
  58. data/assets/images/symbols/comment.svg +3 -0
  59. data/assets/images/symbols/commenting.svg +6 -0
  60. data/assets/images/symbols/comments.svg +4 -0
  61. data/assets/images/symbols/copy.svg +4 -0
  62. data/assets/images/symbols/credit-card.svg +4 -0
  63. data/assets/images/symbols/database.svg +6 -0
  64. data/assets/images/symbols/desktop.svg +6 -0
  65. data/assets/images/symbols/download.svg +5 -0
  66. data/assets/images/symbols/dribbble.svg +6 -0
  67. data/assets/images/symbols/expand.svg +6 -0
  68. data/assets/images/symbols/facebook.svg +3 -0
  69. data/assets/images/symbols/file-edit.svg +4 -0
  70. data/assets/images/symbols/file.svg +3 -0
  71. data/assets/images/symbols/flickr.svg +4 -0
  72. data/assets/images/symbols/folder.svg +3 -0
  73. data/assets/images/symbols/forward.svg +3 -0
  74. data/assets/images/symbols/foursquare.svg +3 -0
  75. data/assets/images/symbols/future.svg +6 -0
  76. data/assets/images/symbols/git-branch.svg +6 -0
  77. data/assets/images/symbols/git-fork.svg +6 -0
  78. data/assets/images/symbols/github-alt.svg +3 -0
  79. data/assets/images/symbols/github.svg +3 -0
  80. data/assets/images/symbols/google-plus.svg +4 -0
  81. data/assets/images/symbols/google.svg +3 -0
  82. data/assets/images/symbols/grid.svg +11 -0
  83. data/assets/images/symbols/happy.svg +6 -0
  84. data/assets/images/symbols/hashtag.svg +3 -0
  85. data/assets/images/symbols/heart.svg +3 -0
  86. data/assets/images/symbols/history.svg +6 -0
  87. data/assets/images/symbols/home.svg +5 -0
  88. data/assets/images/symbols/image.svg +6 -0
  89. data/assets/images/symbols/info.svg +4 -0
  90. data/assets/images/symbols/instagram.svg +5 -0
  91. data/assets/images/symbols/italic.svg +3 -0
  92. data/assets/images/symbols/joomla.svg +6 -0
  93. data/assets/images/symbols/laptop.svg +4 -0
  94. data/assets/images/symbols/lifesaver.svg +3 -0
  95. data/assets/images/symbols/link.svg +5 -0
  96. data/assets/images/symbols/linkedin.svg +4 -0
  97. data/assets/images/symbols/list.svg +8 -0
  98. data/assets/images/symbols/location.svg +4 -0
  99. data/assets/images/symbols/lock.svg +4 -0
  100. data/assets/images/symbols/mail.svg +4 -0
  101. data/assets/images/symbols/menu.svg +5 -0
  102. data/assets/images/symbols/minus-circle.svg +4 -0
  103. data/assets/images/symbols/minus.svg +3 -0
  104. data/assets/images/symbols/more-vertical.svg +5 -0
  105. data/assets/images/symbols/more.svg +5 -0
  106. data/assets/images/symbols/move.svg +8 -0
  107. data/assets/images/symbols/nut.svg +4 -0
  108. data/assets/images/symbols/pagekit.svg +3 -0
  109. data/assets/images/symbols/paint-bucket.svg +5 -0
  110. data/assets/images/symbols/pencil.svg +4 -0
  111. data/assets/images/symbols/phone-landscape.svg +4 -0
  112. data/assets/images/symbols/phone-receiver.svg +3 -0
  113. data/assets/images/symbols/phone.svg +4 -0
  114. data/assets/images/symbols/pinterest.svg +3 -0
  115. data/assets/images/symbols/play-circle.svg +4 -0
  116. data/assets/images/symbols/play.svg +3 -0
  117. data/assets/images/symbols/plus-circle.svg +5 -0
  118. data/assets/images/symbols/plus.svg +4 -0
  119. data/assets/images/symbols/pull.svg +5 -0
  120. data/assets/images/symbols/push.svg +5 -0
  121. data/assets/images/symbols/question.svg +5 -0
  122. data/assets/images/symbols/quote-right.svg +4 -0
  123. data/assets/images/symbols/refresh.svg +4 -0
  124. data/assets/images/symbols/reply.svg +3 -0
  125. data/assets/images/symbols/rss.svg +5 -0
  126. data/assets/images/symbols/search.svg +4 -0
  127. data/assets/images/symbols/server.svg +15 -0
  128. data/assets/images/symbols/settings.svg +11 -0
  129. data/assets/images/symbols/shrink.svg +6 -0
  130. data/assets/images/symbols/sign-in.svg +4 -0
  131. data/assets/images/symbols/sign-out.svg +4 -0
  132. data/assets/images/symbols/social.svg +7 -0
  133. data/assets/images/symbols/soundcloud.svg +6 -0
  134. data/assets/images/symbols/star.svg +3 -0
  135. data/assets/images/symbols/strikethrough.svg +4 -0
  136. data/assets/images/symbols/table.svg +6 -0
  137. data/assets/images/symbols/tablet-landscape.svg +4 -0
  138. data/assets/images/symbols/tablet.svg +4 -0
  139. data/assets/images/symbols/tag.svg +4 -0
  140. data/assets/images/symbols/thumbnails.svg +6 -0
  141. data/assets/images/symbols/trash.svg +7 -0
  142. data/assets/images/symbols/triangle-down.svg +3 -0
  143. data/assets/images/symbols/triangle-left.svg +3 -0
  144. data/assets/images/symbols/triangle-right.svg +3 -0
  145. data/assets/images/symbols/triangle-up.svg +3 -0
  146. data/assets/images/symbols/tumblr.svg +3 -0
  147. data/assets/images/symbols/tv.svg +4 -0
  148. data/assets/images/symbols/twitter.svg +3 -0
  149. data/assets/images/symbols/uikit.svg +4 -0
  150. data/assets/images/symbols/unlock.svg +4 -0
  151. data/assets/images/symbols/upload.svg +5 -0
  152. data/assets/images/symbols/user.svg +4 -0
  153. data/assets/images/symbols/users.svg +5 -0
  154. data/assets/images/symbols/video-camera.svg +4 -0
  155. data/assets/images/symbols/vimeo.svg +3 -0
  156. data/assets/images/symbols/warning.svg +5 -0
  157. data/assets/images/symbols/whatsapp.svg +3 -0
  158. data/assets/images/symbols/wordpress.svg +3 -0
  159. data/assets/images/symbols/world.svg +7 -0
  160. data/assets/images/symbols/xing.svg +4 -0
  161. data/assets/images/symbols/youtube.svg +3 -0
  162. data/assets/javascripts/uikit.js +6398 -0
  163. data/assets/stylesheets/components/_import.components.less +55 -0
  164. data/assets/stylesheets/components/_import.utilities.less +19 -0
  165. data/assets/stylesheets/components/accordion.less +110 -0
  166. data/assets/stylesheets/components/alert.less +147 -0
  167. data/assets/stylesheets/components/align.less +142 -0
  168. data/assets/stylesheets/components/animation.less +638 -0
  169. data/assets/stylesheets/components/article.less +113 -0
  170. data/assets/stylesheets/components/background.less +136 -0
  171. data/assets/stylesheets/components/badge.less +104 -0
  172. data/assets/stylesheets/components/base.less +737 -0
  173. data/assets/stylesheets/components/breadcrumb.less +150 -0
  174. data/assets/stylesheets/components/button.less +541 -0
  175. data/assets/stylesheets/components/card.less +363 -0
  176. data/assets/stylesheets/components/close.less +119 -0
  177. data/assets/stylesheets/components/column.less +285 -0
  178. data/assets/stylesheets/components/comment.less +171 -0
  179. data/assets/stylesheets/components/container.less +106 -0
  180. data/assets/stylesheets/components/cover.less +56 -0
  181. data/assets/stylesheets/components/description-list.less +71 -0
  182. data/assets/stylesheets/components/divider.less +147 -0
  183. data/assets/stylesheets/components/dotnav.less +190 -0
  184. data/assets/stylesheets/components/drop.less +74 -0
  185. data/assets/stylesheets/components/dropdown.less +150 -0
  186. data/assets/stylesheets/components/flex.less +335 -0
  187. data/assets/stylesheets/components/form.less +836 -0
  188. data/assets/stylesheets/components/grid.less +363 -0
  189. data/assets/stylesheets/components/heading.less +238 -0
  190. data/assets/stylesheets/components/icon.less +242 -0
  191. data/assets/stylesheets/components/iconnav.less +166 -0
  192. data/assets/stylesheets/components/inverse.less +52 -0
  193. data/assets/stylesheets/components/label.less +110 -0
  194. data/assets/stylesheets/components/link.less +91 -0
  195. data/assets/stylesheets/components/list.less +205 -0
  196. data/assets/stylesheets/components/margin.less +161 -0
  197. data/assets/stylesheets/components/mixin.less +20 -0
  198. data/assets/stylesheets/components/modal.less +403 -0
  199. data/assets/stylesheets/components/nav.less +438 -0
  200. data/assets/stylesheets/components/navbar.less +596 -0
  201. data/assets/stylesheets/components/notification.less +190 -0
  202. data/assets/stylesheets/components/offcanvas.less +250 -0
  203. data/assets/stylesheets/components/overlay.less +89 -0
  204. data/assets/stylesheets/components/padding.less +79 -0
  205. data/assets/stylesheets/components/pagination.less +169 -0
  206. data/assets/stylesheets/components/placeholder.less +45 -0
  207. data/assets/stylesheets/components/position.less +221 -0
  208. data/assets/stylesheets/components/print.less +61 -0
  209. data/assets/stylesheets/components/progress.less +102 -0
  210. data/assets/stylesheets/components/search.less +442 -0
  211. data/assets/stylesheets/components/section.less +230 -0
  212. data/assets/stylesheets/components/slidenav.less +145 -0
  213. data/assets/stylesheets/components/sortable.less +101 -0
  214. data/assets/stylesheets/components/spinner.less +103 -0
  215. data/assets/stylesheets/components/sticky.less +57 -0
  216. data/assets/stylesheets/components/subnav.less +305 -0
  217. data/assets/stylesheets/components/switcher.less +47 -0
  218. data/assets/stylesheets/components/tab.less +226 -0
  219. data/assets/stylesheets/components/table.less +207 -0
  220. data/assets/stylesheets/components/text.less +254 -0
  221. data/assets/stylesheets/components/tooltip.less +84 -0
  222. data/assets/stylesheets/components/totop.less +97 -0
  223. data/assets/stylesheets/components/transition.less +187 -0
  224. data/assets/stylesheets/components/utility.less +516 -0
  225. data/assets/stylesheets/components/variables.less +117 -0
  226. data/assets/stylesheets/components/visibility.less +109 -0
  227. data/assets/stylesheets/components/width.less +418 -0
  228. data/assets/stylesheets/theme/_import.less +72 -0
  229. data/assets/stylesheets/theme/accordion.less +76 -0
  230. data/assets/stylesheets/theme/alert.less +76 -0
  231. data/assets/stylesheets/theme/align.less +14 -0
  232. data/assets/stylesheets/theme/animation.less +14 -0
  233. data/assets/stylesheets/theme/article.less +60 -0
  234. data/assets/stylesheets/theme/background.less +14 -0
  235. data/assets/stylesheets/theme/badge.less +29 -0
  236. data/assets/stylesheets/theme/base.less +134 -0
  237. data/assets/stylesheets/theme/breadcrumb.less +42 -0
  238. data/assets/stylesheets/theme/button.less +221 -0
  239. data/assets/stylesheets/theme/card.less +193 -0
  240. data/assets/stylesheets/theme/close.less +34 -0
  241. data/assets/stylesheets/theme/column.less +14 -0
  242. data/assets/stylesheets/theme/comment.less +72 -0
  243. data/assets/stylesheets/theme/container.less +14 -0
  244. data/assets/stylesheets/theme/description-list.less +36 -0
  245. data/assets/stylesheets/theme/divider.less +41 -0
  246. data/assets/stylesheets/theme/dotnav.less +41 -0
  247. data/assets/stylesheets/theme/drop.less +14 -0
  248. data/assets/stylesheets/theme/dropdown.less +45 -0
  249. data/assets/stylesheets/theme/form.less +150 -0
  250. data/assets/stylesheets/theme/grid.less +14 -0
  251. data/assets/stylesheets/theme/heading.less +59 -0
  252. data/assets/stylesheets/theme/icon.less +55 -0
  253. data/assets/stylesheets/theme/iconnav.less +34 -0
  254. data/assets/stylesheets/theme/inverse.less +14 -0
  255. data/assets/stylesheets/theme/label.less +46 -0
  256. data/assets/stylesheets/theme/link.less +35 -0
  257. data/assets/stylesheets/theme/list.less +49 -0
  258. data/assets/stylesheets/theme/margin.less +14 -0
  259. data/assets/stylesheets/theme/modal.less +95 -0
  260. data/assets/stylesheets/theme/nav.less +94 -0
  261. data/assets/stylesheets/theme/navbar.less +175 -0
  262. data/assets/stylesheets/theme/notification.less +44 -0
  263. data/assets/stylesheets/theme/offcanvas.less +26 -0
  264. data/assets/stylesheets/theme/overlay.less +33 -0
  265. data/assets/stylesheets/theme/padding.less +14 -0
  266. data/assets/stylesheets/theme/pagination.less +44 -0
  267. data/assets/stylesheets/theme/placeholder.less +29 -0
  268. data/assets/stylesheets/theme/position.less +14 -0
  269. data/assets/stylesheets/theme/progress.less +27 -0
  270. data/assets/stylesheets/theme/search.less +67 -0
  271. data/assets/stylesheets/theme/section.less +34 -0
  272. data/assets/stylesheets/theme/slidenav.less +49 -0
  273. data/assets/stylesheets/theme/sortable.less +38 -0
  274. data/assets/stylesheets/theme/spinner.less +14 -0
  275. data/assets/stylesheets/theme/sticky.less +14 -0
  276. data/assets/stylesheets/theme/subnav.less +81 -0
  277. data/assets/stylesheets/theme/tab.less +139 -0
  278. data/assets/stylesheets/theme/table.less +65 -0
  279. data/assets/stylesheets/theme/text.less +60 -0
  280. data/assets/stylesheets/theme/tooltip.less +20 -0
  281. data/assets/stylesheets/theme/totop.less +35 -0
  282. data/assets/stylesheets/theme/transition.less +14 -0
  283. data/assets/stylesheets/theme/utility.less +46 -0
  284. data/assets/stylesheets/theme/variables.less +36 -0
  285. data/assets/stylesheets/theme/width.less +14 -0
  286. data/assets/stylesheets/uikit.less +17 -0
  287. data/assets/stylesheets/uikit.theme.less +23 -0
  288. data/bin/console +14 -0
  289. data/bin/setup +8 -0
  290. data/lib/uikit3/rails.rb +8 -0
  291. data/lib/uikit3/rails/version.rb +5 -0
  292. data/uikit3-rails.gemspec +29 -0
  293. metadata +391 -0
@@ -0,0 +1,150 @@
1
+ // Name: Breadcrumb
2
+ // Description: Component to create a breadcrumb navigation
3
+ //
4
+ // Component: `uk-breadcrumb`
5
+ //
6
+ // States: `uk-disabled`
7
+ //
8
+ // ========================================================================
9
+
10
+
11
+ // Variables
12
+ // ========================================================================
13
+
14
+ @breadcrumb-item-font-size: @global-small-font-size;
15
+ @breadcrumb-item-color: @global-muted-color;
16
+ @breadcrumb-item-hover-color: @global-color;
17
+ @breadcrumb-item-hover-text-decoration: none;
18
+ @breadcrumb-item-active-color: @global-color;
19
+
20
+ @breadcrumb-divider: "/";
21
+ @breadcrumb-divider-margin-horizontal: 20px;
22
+ @breadcrumb-divider-color: @global-muted-color;
23
+
24
+
25
+ /* ========================================================================
26
+ Component: Breadcrumb
27
+ ========================================================================== */
28
+
29
+ /*
30
+ * 1. Allow items to wrap into the next line
31
+ * 2. Reset lists
32
+ */
33
+
34
+ .uk-breadcrumb {
35
+ display: -ms-flexbox;
36
+ display: -webkit-flex;
37
+ display: flex;
38
+ /* 1 */
39
+ -ms-flex-wrap: wrap;
40
+ -webkit-flex-wrap: wrap;
41
+ flex-wrap: wrap;
42
+ /* 2 */
43
+ padding: 0;
44
+ list-style: none;
45
+ .hook-breadcrumb;
46
+ }
47
+
48
+ /*
49
+ * Space is allocated solely based on content dimensions: 0 0 auto
50
+ */
51
+
52
+ .uk-breadcrumb > * {
53
+ -ms-flex: none;
54
+ -webkit-flex: none;
55
+ flex: none;
56
+ }
57
+
58
+
59
+ /* Items
60
+ ========================================================================== */
61
+
62
+ .uk-breadcrumb > * > * {
63
+ display: inline-block;
64
+ font-size: @breadcrumb-item-font-size;
65
+ color: @breadcrumb-item-color;
66
+ .hook-breadcrumb-item;
67
+ }
68
+
69
+ /* Hover + Focus */
70
+ .uk-breadcrumb > * > :hover,
71
+ .uk-breadcrumb > * > :focus {
72
+ color: @breadcrumb-item-hover-color;
73
+ text-decoration: @breadcrumb-item-hover-text-decoration;
74
+ .hook-breadcrumb-item-hover;
75
+ }
76
+
77
+ /* Active */
78
+ .uk-breadcrumb > :last-child > * {
79
+ color: @breadcrumb-item-active-color;
80
+ .hook-breadcrumb-item-active;
81
+ }
82
+
83
+ /*
84
+ * Divider
85
+ * `nth-child` makes it also work without JS if it's only one row
86
+ */
87
+
88
+ .uk-breadcrumb > :nth-child(n+2):not(.uk-first-column)::before {
89
+ content: @breadcrumb-divider;
90
+ display: inline-block;
91
+ margin: 0 @breadcrumb-divider-margin-horizontal;
92
+ color: @breadcrumb-divider-color;
93
+ .hook-breadcrumb-divider;
94
+ }
95
+
96
+
97
+ // Hooks
98
+ // ========================================================================
99
+
100
+ .hook-breadcrumb-misc;
101
+
102
+ .hook-breadcrumb() {}
103
+ .hook-breadcrumb-item() {}
104
+ .hook-breadcrumb-item-hover() {}
105
+ .hook-breadcrumb-item-active() {}
106
+ .hook-breadcrumb-divider() {}
107
+ .hook-breadcrumb-misc() {}
108
+
109
+
110
+ // Inverse
111
+ // ========================================================================
112
+
113
+ @inverse-breadcrumb-item-color: @inverse-global-muted-color;
114
+ @inverse-breadcrumb-item-hover-color: @inverse-global-color;
115
+ @inverse-breadcrumb-item-active-color: @inverse-global-color;
116
+ @inverse-breadcrumb-divider-color: @inverse-global-muted-color;
117
+
118
+ .hook-inverse() {
119
+
120
+ .uk-breadcrumb > * > * {
121
+ color: @inverse-breadcrumb-item-color;
122
+ .hook-inverse-breadcrumb-item;
123
+ }
124
+
125
+ .uk-breadcrumb > * > :hover,
126
+ .uk-breadcrumb > * > :focus {
127
+ color: @inverse-breadcrumb-item-hover-color;
128
+ .hook-inverse-breadcrumb-item-hover;
129
+ }
130
+
131
+ .uk-breadcrumb > :last-child > * {
132
+ color: @inverse-breadcrumb-item-active-color;
133
+ .hook-inverse-breadcrumb-item-active;
134
+ }
135
+
136
+ //
137
+ // Divider
138
+ //
139
+
140
+ .uk-breadcrumb > :nth-child(n+2):not(.uk-first-column)::before {
141
+ color: @inverse-breadcrumb-divider-color;
142
+ .hook-inverse-breadcrumb-divider;
143
+ }
144
+
145
+ }
146
+
147
+ .hook-inverse-breadcrumb-item() {}
148
+ .hook-inverse-breadcrumb-item-hover() {}
149
+ .hook-inverse-breadcrumb-item-active() {}
150
+ .hook-inverse-breadcrumb-divider() {}
@@ -0,0 +1,541 @@
1
+ // Name: Button
2
+ // Description: Styles for buttons
3
+ //
4
+ // Component: `uk-button`
5
+ //
6
+ // Sub-objects: `uk-button-group`
7
+ //
8
+ // Modifiers: `uk-button-default`
9
+ // `uk-button-primary`
10
+ // `uk-button-secondary`
11
+ // `uk-button-danger`
12
+ // `uk-button-text`
13
+ // `uk-button-link`
14
+ // `uk-button-small`
15
+ // `uk-button-large`
16
+ //
17
+ // States: `uk-active`
18
+ //
19
+ // ========================================================================
20
+
21
+
22
+ // Variables
23
+ // ========================================================================
24
+
25
+ @button-line-height: @global-control-height;
26
+ @button-small-line-height: @global-control-small-height;
27
+ @button-large-line-height: @global-control-large-height;
28
+
29
+ @button-font-size: @global-font-size;
30
+ @button-small-font-size: @global-small-font-size;
31
+ @button-large-font-size: @global-medium-font-size;
32
+
33
+ @button-padding-horizontal: @global-gutter;
34
+ @button-small-padding-horizontal: @global-small-gutter;
35
+ @button-large-padding-horizontal: @global-medium-gutter;
36
+
37
+ @button-default-background: @global-muted-background;
38
+ @button-default-color: @global-emphasis-color;
39
+ @button-default-hover-background: darken(@button-default-background, 5%);
40
+ @button-default-hover-color: @global-emphasis-color;
41
+ @button-default-active-background: darken(@button-default-background, 10%);
42
+ @button-default-active-color: @global-emphasis-color;
43
+
44
+ @button-primary-background: @global-primary-background;
45
+ @button-primary-color: @global-inverse-color;
46
+ @button-primary-hover-background: darken(@button-primary-background, 5%);
47
+ @button-primary-hover-color: @global-inverse-color;
48
+ @button-primary-active-background: darken(@button-primary-background, 10%);
49
+ @button-primary-active-color: @global-inverse-color;
50
+
51
+ @button-secondary-background: @global-secondary-background;
52
+ @button-secondary-color: @global-inverse-color;
53
+ @button-secondary-hover-background: darken(@button-secondary-background, 5%);
54
+ @button-secondary-hover-color: @global-inverse-color;
55
+ @button-secondary-active-background: darken(@button-secondary-background, 10%);
56
+ @button-secondary-active-color: @global-inverse-color;
57
+
58
+ @button-danger-background: @global-danger-background;
59
+ @button-danger-color: @global-inverse-color;
60
+ @button-danger-hover-background: darken(@button-danger-background, 5%);
61
+ @button-danger-hover-color: @global-inverse-color;
62
+ @button-danger-active-background: darken(@button-danger-background, 10%);
63
+ @button-danger-active-color: @global-inverse-color;
64
+
65
+ @button-disabled-background: @global-muted-background;
66
+ @button-disabled-color: @global-muted-color;
67
+
68
+ @button-text-line-height: @global-line-height;
69
+ @button-text-color: @global-muted-color;
70
+ @button-text-hover-color: @global-color;
71
+ @button-text-disabled-color: @global-muted-color;
72
+
73
+ @button-link-line-height: @global-line-height;
74
+ @button-link-color: @global-link-color;
75
+ @button-link-hover-color: @global-link-hover-color;
76
+ @button-link-hover-text-decoration: underline;
77
+ @button-link-disabled-color: @global-muted-color;
78
+
79
+
80
+ /* ========================================================================
81
+ Component: Button
82
+ ========================================================================== */
83
+
84
+ /*
85
+ * 1. Remove margins in Chrome, Safari and Opera.
86
+ * 2. Remove borders for `button`.
87
+ * 3. Address `overflow` set to `hidden` in IE.
88
+ * 4. Correct `font` properties and `color` not being inherited for `button`.
89
+ * 5. Remove the inheritance of text transform in Edge, Firefox, and IE.
90
+ * 6. Style
91
+ * 7. `line-height` is used to create a height because it also centers the text vertically for `a` elements.
92
+ * Better would be to use height and flexbox to center the text vertically but flexbox doesn't work in Firefox on `button` elements.
93
+ * 8. Align text if button has a width
94
+ * 9. Required for `a`.
95
+ */
96
+
97
+ .uk-button {
98
+ /* 1 */
99
+ margin: 0;
100
+ /* 2 */
101
+ border: none;
102
+ /* 3 */
103
+ overflow: visible;
104
+ /* 4 */
105
+ font: inherit;
106
+ color: inherit;
107
+ /* 5 */
108
+ text-transform: none;
109
+ /* 6 */
110
+ display: inline-block;
111
+ box-sizing: border-box;
112
+ padding: 0 @button-padding-horizontal;
113
+ vertical-align: middle;
114
+ font-size: @button-font-size;
115
+ /* 7 */
116
+ line-height: @button-line-height;
117
+ /* 8 */
118
+ text-align: center;
119
+ /* 9 */
120
+ text-decoration: none;
121
+ .hook-button;
122
+ }
123
+
124
+ .uk-button:not(:disabled) { cursor: pointer; }
125
+
126
+ /*
127
+ * Remove the inner border and padding in Firefox.
128
+ */
129
+
130
+ .uk-button::-moz-focus-inner {
131
+ border: 0;
132
+ padding: 0;
133
+ }
134
+
135
+ /* Hover */
136
+ .uk-button:hover {
137
+ /* 8 */
138
+ text-decoration: none;
139
+ .hook-button-hover;
140
+ }
141
+
142
+ /* Focus */
143
+ .uk-button:focus {
144
+ outline: none;
145
+ .hook-button-focus;
146
+ }
147
+
148
+ /* OnClick + Active */
149
+ .uk-button:active,
150
+ .uk-button.uk-active {
151
+ .hook-button-active;
152
+ }
153
+
154
+
155
+ /* Style modifiers
156
+ ========================================================================== */
157
+
158
+ /*
159
+ * Default
160
+ */
161
+
162
+ .uk-button-default {
163
+ background-color: @button-default-background;
164
+ color: @button-default-color;
165
+ .hook-button-default;
166
+ }
167
+
168
+ /* Hover + Focus */
169
+ .uk-button-default:hover,
170
+ .uk-button-default:focus {
171
+ background-color: @button-default-hover-background;
172
+ color: @button-default-hover-color;
173
+ .hook-button-default-hover;
174
+ }
175
+
176
+ /* OnClick + Active */
177
+ .uk-button-default:active,
178
+ .uk-button-default.uk-active {
179
+ background-color: @button-default-active-background;
180
+ color: @button-default-active-color;
181
+ .hook-button-default-active;
182
+ }
183
+
184
+ /*
185
+ * Primary
186
+ */
187
+
188
+ .uk-button-primary {
189
+ background-color: @button-primary-background;
190
+ color: @button-primary-color;
191
+ .hook-button-primary;
192
+ }
193
+
194
+ /* Hover + Focus */
195
+ .uk-button-primary:hover,
196
+ .uk-button-primary:focus {
197
+ background-color: @button-primary-hover-background;
198
+ color: @button-primary-hover-color;
199
+ .hook-button-primary-hover;
200
+ }
201
+
202
+ /* OnClick + Active */
203
+ .uk-button-primary:active,
204
+ .uk-button-primary.uk-active {
205
+ background-color: @button-primary-active-background;
206
+ color: @button-primary-active-color;
207
+ .hook-button-primary-active;
208
+ }
209
+
210
+ /*
211
+ * Secondary
212
+ */
213
+
214
+ .uk-button-secondary {
215
+ background-color: @button-secondary-background;
216
+ color: @button-secondary-color;
217
+ .hook-button-secondary;
218
+ }
219
+
220
+ /* Hover + Focus */
221
+ .uk-button-secondary:hover,
222
+ .uk-button-secondary:focus {
223
+ background-color: @button-secondary-hover-background;
224
+ color: @button-secondary-hover-color;
225
+ .hook-button-secondary-hover;
226
+ }
227
+
228
+ /* OnClick + Active */
229
+ .uk-button-secondary:active,
230
+ .uk-button-secondary.uk-active {
231
+ background-color: @button-secondary-active-background;
232
+ color: @button-secondary-active-color;
233
+ .hook-button-secondary-active;
234
+ }
235
+
236
+ /*
237
+ * Danger
238
+ */
239
+
240
+ .uk-button-danger {
241
+ background-color: @button-danger-background;
242
+ color: @button-danger-color;
243
+ .hook-button-danger;
244
+ }
245
+
246
+ /* Hover + Focus */
247
+ .uk-button-danger:hover,
248
+ .uk-button-danger:focus {
249
+ background-color: @button-danger-hover-background;
250
+ color: @button-danger-hover-color;
251
+ .hook-button-danger-hover;
252
+ }
253
+
254
+ /* OnClick + Active */
255
+ .uk-button-danger:active,
256
+ .uk-button-danger.uk-active {
257
+ background-color: @button-danger-active-background;
258
+ color: @button-danger-active-color;
259
+ .hook-button-danger-active;
260
+ }
261
+
262
+ /*
263
+ * Disabled
264
+ * The same for all style modifiers
265
+ */
266
+
267
+ .uk-button-default:disabled,
268
+ .uk-button-primary:disabled,
269
+ .uk-button-secondary:disabled,
270
+ .uk-button-danger:disabled {
271
+ background-color: @button-disabled-background;
272
+ color: @button-disabled-color;
273
+ .hook-button-disabled;
274
+ }
275
+
276
+
277
+ /* Size modifiers
278
+ ========================================================================== */
279
+
280
+ .uk-button-small {
281
+ padding: 0 @button-small-padding-horizontal;
282
+ line-height: @button-small-line-height;
283
+ font-size: @button-small-font-size;
284
+ .hook-button-small;
285
+ }
286
+
287
+ .uk-button-large {
288
+ padding: 0 @button-large-padding-horizontal;
289
+ line-height: @button-large-line-height;
290
+ font-size: @button-large-font-size;
291
+ .hook-button-large;
292
+ }
293
+
294
+
295
+ /* Text modifiers
296
+ ========================================================================== */
297
+
298
+ /*
299
+ * Text
300
+ * 1. Reset
301
+ * 2. Style
302
+ */
303
+
304
+ .uk-button-text {
305
+ /* 1 */
306
+ padding: 0;
307
+ line-height: @button-text-line-height;
308
+ background: none;
309
+ /* 2 */
310
+ color: @button-text-color;
311
+ .hook-button-text;
312
+ }
313
+
314
+ /* Hover + Focus */
315
+ .uk-button-text:hover,
316
+ .uk-button-text:focus {
317
+ color: @button-text-hover-color;
318
+ .hook-button-text-hover;
319
+ }
320
+
321
+ /* Disabled */
322
+ .uk-button-text:disabled {
323
+ color: @button-text-disabled-color;
324
+ .hook-button-text-disabled;
325
+ }
326
+
327
+ /*
328
+ * Link
329
+ * 1. Reset
330
+ * 2. Style
331
+ */
332
+
333
+ .uk-button-link {
334
+ /* 1 */
335
+ padding: 0;
336
+ line-height: @button-link-line-height;
337
+ background: none;
338
+ /* 2 */
339
+ color: @button-link-color;
340
+ .hook-button-link;
341
+ }
342
+
343
+ /* Hover + Focus */
344
+ .uk-button-link:hover,
345
+ .uk-button-link:focus {
346
+ color: @button-link-hover-color;
347
+ text-decoration: @button-link-hover-text-decoration;
348
+ }
349
+
350
+ /* Disabled */
351
+ .uk-button-link:disabled {
352
+ color: @button-link-disabled-color;
353
+ text-decoration: none;
354
+ }
355
+
356
+
357
+ /* Group
358
+ ========================================================================== */
359
+
360
+ /*
361
+ * 1. Using `flex` instead of `inline-block` to prevent whitespace betweent child elements
362
+ * 2. Behave like button
363
+ * 3. Create position context
364
+ */
365
+
366
+ .uk-button-group {
367
+ /* 1 */
368
+ display: -ms-inline-flexbox;
369
+ display: -webkit-inline-flex;
370
+ display: inline-flex;
371
+ /* 2 */
372
+ vertical-align: middle;
373
+ /* 3 */
374
+ position: relative;
375
+ }
376
+
377
+
378
+ // Hooks
379
+ // ========================================================================
380
+
381
+ .hook-button-misc;
382
+
383
+ .hook-button() {}
384
+ .hook-button-hover() {}
385
+ .hook-button-focus() {}
386
+ .hook-button-active() {}
387
+ .hook-button-default() {}
388
+ .hook-button-default-hover() {}
389
+ .hook-button-default-active() {}
390
+ .hook-button-primary() {}
391
+ .hook-button-primary-hover() {}
392
+ .hook-button-primary-active() {}
393
+ .hook-button-secondary() {}
394
+ .hook-button-secondary-hover() {}
395
+ .hook-button-secondary-active() {}
396
+ .hook-button-danger() {}
397
+ .hook-button-danger-hover() {}
398
+ .hook-button-danger-active() {}
399
+ .hook-button-disabled() {}
400
+ .hook-button-small() {}
401
+ .hook-button-large() {}
402
+ .hook-button-text() {}
403
+ .hook-button-text-hover() {}
404
+ .hook-button-text-disabled() {}
405
+ .hook-button-link() {}
406
+ .hook-button-misc() {}
407
+
408
+
409
+ // Inverse
410
+ // ========================================================================
411
+
412
+ @inverse-button-default-background: @inverse-global-primary-background;
413
+ @inverse-button-default-color: @inverse-global-inverse-color;
414
+ @inverse-button-default-hover-background: darken(@inverse-button-default-background, 5%);
415
+ @inverse-button-default-hover-color: @inverse-global-inverse-color;
416
+ @inverse-button-default-active-background: darken(@inverse-button-default-background, 10%);
417
+ @inverse-button-default-active-color: @inverse-global-inverse-color;
418
+ @inverse-button-primary-background: @inverse-global-primary-background;
419
+ @inverse-button-primary-color: @inverse-global-inverse-color;
420
+ @inverse-button-primary-hover-background: darken(@inverse-button-primary-background, 5%);
421
+ @inverse-button-primary-hover-color: @inverse-global-inverse-color;
422
+ @inverse-button-primary-active-background: darken(@inverse-button-primary-background, 10%);
423
+ @inverse-button-primary-active-color: @inverse-global-inverse-color;
424
+ @inverse-button-secondary-background: @inverse-global-primary-background;
425
+ @inverse-button-secondary-color: @inverse-global-inverse-color;
426
+ @inverse-button-secondary-hover-background: darken(@inverse-button-secondary-background, 5%);
427
+ @inverse-button-secondary-hover-color: @inverse-global-inverse-color;
428
+ @inverse-button-secondary-active-background: darken(@inverse-button-secondary-background, 10%);
429
+ @inverse-button-secondary-active-color: @inverse-global-inverse-color;
430
+ @inverse-button-text-color: @inverse-global-muted-color;
431
+ @inverse-button-text-hover-color: @inverse-global-color;
432
+ @inverse-button-text-disabled-color: @inverse-global-muted-color;
433
+
434
+ .hook-inverse() {
435
+
436
+ //
437
+ // Default
438
+ //
439
+
440
+ .uk-button-default {
441
+ background-color: @inverse-button-default-background;
442
+ color: @inverse-button-default-color;
443
+ .hook-inverse-button-default;
444
+ }
445
+
446
+ .uk-button-default:hover,
447
+ .uk-button-default:focus {
448
+ background-color: @inverse-button-default-hover-background;
449
+ color: @inverse-button-default-hover-color;
450
+ .hook-inverse-button-default-hover;
451
+ }
452
+
453
+ .uk-button-default:active,
454
+ .uk-button-default.uk-active {
455
+ background-color: @inverse-button-default-active-background;
456
+ color: @inverse-button-default-active-color;
457
+ .hook-inverse-button-default-active;
458
+ }
459
+
460
+ //
461
+ // Primary
462
+ //
463
+
464
+ .uk-button-primary {
465
+ background-color: @inverse-button-primary-background;
466
+ color: @inverse-button-primary-color;
467
+ .hook-inverse-button-primary;
468
+ }
469
+
470
+ .uk-button-primary:hover,
471
+ .uk-button-primary:focus {
472
+ background-color: @inverse-button-primary-hover-background;
473
+ color: @inverse-button-primary-hover-color;
474
+ .hook-inverse-button-primary-hover;
475
+ }
476
+
477
+ .uk-button-primary:active,
478
+ .uk-button-primary.uk-active {
479
+ background-color: @inverse-button-primary-active-background;
480
+ color: @inverse-button-primary-active-color;
481
+ .hook-inverse-button-primary-active;
482
+ }
483
+
484
+ //
485
+ // Secondary
486
+ //
487
+
488
+ .uk-button-secondary {
489
+ background-color: @inverse-button-secondary-background;
490
+ color: @inverse-button-secondary-color;
491
+ .hook-inverse-button-secondary;
492
+ }
493
+
494
+ .uk-button-secondary:hover,
495
+ .uk-button-secondary:focus {
496
+ background-color: @inverse-button-secondary-hover-background;
497
+ color: @inverse-button-secondary-hover-color;
498
+ .hook-inverse-button-secondary-hover;
499
+ }
500
+
501
+ .uk-button-secondary:active,
502
+ .uk-button-secondary.uk-active {
503
+ background-color: @inverse-button-secondary-active-background;
504
+ color: @inverse-button-secondary-active-color;
505
+ .hook-inverse-button-secondary-active;
506
+ }
507
+
508
+ //
509
+ // Text
510
+ //
511
+
512
+ .uk-button-text {
513
+ color: @inverse-button-text-color;
514
+ .hook-inverse-button-text;
515
+ }
516
+
517
+ .uk-button-text:hover,
518
+ .uk-button-text:focus {
519
+ color: @inverse-button-text-hover-color;
520
+ .hook-inverse-button-text-hover;
521
+ }
522
+
523
+ .uk-button-text:disabled {
524
+ color: @inverse-button-text-disabled-color;
525
+ .hook-inverse-button-text-disabled;
526
+ }
527
+
528
+ }
529
+
530
+ .hook-inverse-button-default() {}
531
+ .hook-inverse-button-default-hover() {}
532
+ .hook-inverse-button-default-active() {}
533
+ .hook-inverse-button-primary() {}
534
+ .hook-inverse-button-primary-hover() {}
535
+ .hook-inverse-button-primary-active() {}
536
+ .hook-inverse-button-secondary() {}
537
+ .hook-inverse-button-secondary-hover() {}
538
+ .hook-inverse-button-secondary-active() {}
539
+ .hook-inverse-button-text() {}
540
+ .hook-inverse-button-text-hover() {}
541
+ .hook-inverse-button-text-disabled() {}