zurb-foundation 3.2.5 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. data/.gitignore +6 -2
  2. data/CHANGELOG.md +1 -26
  3. data/CONTRIBUTING.md +18 -0
  4. data/Gemfile.lock +19 -0
  5. data/Gruntfile.js +27 -0
  6. data/README.md +5 -6
  7. data/{Capfile → docs/Capfile} +0 -1
  8. data/docs/Gemfile +8 -0
  9. data/docs/Gemfile.lock +43 -0
  10. data/docs/Procfile +2 -0
  11. data/docs/README.md +1 -0
  12. data/docs/_sidebar-components.html.erb +109 -0
  13. data/docs/_sidebar.html.erb +109 -0
  14. data/docs/_zurb-jobs.html.erb +5 -0
  15. data/docs/changelog.html.erb +185 -0
  16. data/docs/compile.rb +43 -0
  17. data/docs/components/alert-boxes.html.erb +202 -0
  18. data/docs/components/block-grid.html.erb +118 -0
  19. data/docs/components/breadcrumbs.html.erb +146 -0
  20. data/docs/components/button-groups.html.erb +174 -0
  21. data/docs/components/buttons.html.erb +220 -0
  22. data/docs/components/clearing.html.erb +152 -0
  23. data/docs/components/custom-forms.html.erb +306 -0
  24. data/docs/components/dropdown-buttons.html.erb +233 -0
  25. data/docs/components/dropdown.html.erb +186 -0
  26. data/docs/components/flex-video.html.erb +93 -0
  27. data/docs/components/forms.html.erb +468 -0
  28. data/docs/components/grid.html.erb +355 -0
  29. data/docs/components/inline-lists.html.erb +89 -0
  30. data/docs/components/joyride.html.erb +178 -0
  31. data/docs/components/keystrokes.html.erb +74 -0
  32. data/docs/components/labels.html.erb +98 -0
  33. data/docs/components/magellan.html.erb +84 -0
  34. data/docs/components/orbit.html.erb +262 -0
  35. data/docs/components/pagination.html.erb +181 -0
  36. data/docs/components/panels.html.erb +121 -0
  37. data/docs/components/pricing-tables.html.erb +154 -0
  38. data/docs/components/progress-bars.html.erb +120 -0
  39. data/docs/components/reveal.html.erb +147 -0
  40. data/docs/components/section.html.erb +156 -0
  41. data/docs/components/side-nav.html.erb +122 -0
  42. data/docs/components/split-buttons.html.erb +218 -0
  43. data/docs/components/sub-nav.html.erb +120 -0
  44. data/docs/components/switch.html.erb +288 -0
  45. data/docs/components/tables.html.erb +123 -0
  46. data/docs/components/thumbnails.html.erb +87 -0
  47. data/docs/components/tooltips.html.erb +73 -0
  48. data/docs/components/top-bar.html.erb +219 -0
  49. data/docs/components/type.html.erb +359 -0
  50. data/docs/components/visibility.html.erb +102 -0
  51. data/docs/config.ru +12 -0
  52. data/docs/config/deploy.rb +33 -0
  53. data/docs/controller.rb +43 -0
  54. data/docs/css/_coderay.scss +116 -0
  55. data/docs/css/_settings.scss +1 -0
  56. data/docs/css/docs.scss +174 -0
  57. data/docs/css/normalize.scss +396 -0
  58. data/docs/css/qunit-composite.css +13 -0
  59. data/docs/css/qunit.css +235 -0
  60. data/docs/faq.html.erb +61 -0
  61. data/docs/img/demos/demo1-th.png +0 -0
  62. data/docs/img/demos/demo1.png +0 -0
  63. data/docs/img/demos/demo2-th.png +0 -0
  64. data/docs/img/demos/demo2.png +0 -0
  65. data/docs/img/demos/demo3-th.png +0 -0
  66. data/docs/img/demos/demo3.png +0 -0
  67. data/docs/img/demos/demo4-th.png +0 -0
  68. data/docs/img/demos/demo4.png +0 -0
  69. data/docs/img/demos/demo5-th.png +0 -0
  70. data/docs/img/demos/demo5.png +0 -0
  71. data/docs/index.html.erb +299 -0
  72. data/docs/javascript.html.erb +133 -0
  73. data/docs/js/docs.js +3 -0
  74. data/docs/js/qunit-composite.js +105 -0
  75. data/docs/js/qunit.js +1977 -0
  76. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  77. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  78. data/docs/js/tests/tooltips/tooltips.html +39 -0
  79. data/docs/js/tests/tooltips/tooltips.js +11 -0
  80. data/docs/layout.html.erb +99 -0
  81. data/docs/rails.html.erb +66 -0
  82. data/docs/sass.html.erb +299 -0
  83. data/docs/support.html.erb +134 -0
  84. data/foundation.gemspec +2 -4
  85. data/index.html +3 -23
  86. data/js/foundation/foundation.alerts.js +50 -0
  87. data/js/foundation/foundation.clearing.js +478 -0
  88. data/{vendor/assets/javascripts/foundation/jquery.cookie.js → js/foundation/foundation.cookie.js} +3 -1
  89. data/js/foundation/foundation.dropdown.js +122 -0
  90. data/js/foundation/foundation.forms.js +403 -0
  91. data/js/foundation/foundation.joyride.js +613 -0
  92. data/js/foundation/foundation.js +331 -0
  93. data/js/foundation/foundation.magellan.js +130 -0
  94. data/js/foundation/foundation.orbit.js +355 -0
  95. data/{vendor/assets/javascripts/foundation/jquery.placeholder.js → js/foundation/foundation.placeholder.js} +4 -2
  96. data/js/foundation/foundation.reveal.js +264 -0
  97. data/js/foundation/foundation.section.js +180 -0
  98. data/js/foundation/foundation.tooltips.js +195 -0
  99. data/js/foundation/foundation.topbar.js +187 -0
  100. data/js/foundation/index.js +16 -0
  101. data/{vendor/assets/javascripts/foundation/modernizr.foundation.js → js/vendor/custom.modernizr.js} +0 -0
  102. data/js/vendor/jquery.js +9597 -0
  103. data/js/vendor/zepto.js +1782 -0
  104. data/lib/foundation/engine.rb +8 -1
  105. data/lib/foundation/generators/install_generator.rb +24 -1
  106. data/lib/foundation/generators/templates/application.html.erb +20 -6
  107. data/lib/foundation/generators/templates/application.html.haml +2 -6
  108. data/lib/foundation/generators/templates/application.html.slim +2 -5
  109. data/lib/foundation/version.rb +1 -1
  110. data/lib/zurb-foundation.rb +7 -9
  111. data/package.json +9 -0
  112. data/scss/foundation.scss +42 -15
  113. data/scss/foundation/_foundation-global.scss +226 -0
  114. data/scss/foundation/components/_alert-boxes.scss +106 -0
  115. data/scss/foundation/components/_block-grid.scss +63 -0
  116. data/scss/foundation/components/_breadcrumbs.scss +117 -0
  117. data/scss/foundation/components/_button-groups.scss +59 -0
  118. data/scss/foundation/components/_buttons.scss +217 -0
  119. data/scss/foundation/components/_clearing.scss +209 -0
  120. data/scss/foundation/components/_custom-forms.scss +232 -0
  121. data/scss/foundation/components/_dropdown-buttons.scss +114 -0
  122. data/scss/foundation/components/_dropdown.scss +137 -0
  123. data/scss/foundation/components/_flex-video.scss +45 -0
  124. data/scss/foundation/components/_forms.scss +309 -0
  125. data/scss/foundation/components/_grid.scss +149 -71
  126. data/scss/foundation/components/_inline-lists.scss +47 -0
  127. data/scss/foundation/components/_joyride.scss +193 -0
  128. data/scss/foundation/components/_keystrokes.scss +56 -0
  129. data/scss/foundation/components/_labels.scss +81 -0
  130. data/scss/foundation/components/_magellan.scss +15 -0
  131. data/scss/foundation/components/_orbit.scss +193 -0
  132. data/scss/foundation/components/_pagination.scss +99 -0
  133. data/scss/foundation/components/_panels.scss +76 -0
  134. data/scss/foundation/components/_pricing-tables.scss +130 -0
  135. data/scss/foundation/components/_progress-bars.scss +68 -0
  136. data/scss/foundation/components/_reveal.scss +131 -0
  137. data/scss/foundation/components/_section.scss +194 -0
  138. data/scss/foundation/components/_side-nav.scss +68 -0
  139. data/scss/foundation/components/_split-buttons.scss +159 -0
  140. data/scss/foundation/components/_sub-nav.scss +67 -0
  141. data/scss/foundation/components/_switch.scss +242 -0
  142. data/scss/foundation/components/_tables.scss +80 -0
  143. data/scss/foundation/components/_thumbs.scss +45 -0
  144. data/scss/foundation/components/_tooltips.scss +113 -0
  145. data/scss/foundation/components/_top-bar.scss +443 -0
  146. data/scss/foundation/components/_type.scss +411 -0
  147. data/scss/foundation/components/_visibility.scss +117 -0
  148. data/scss/normalize.scss +396 -0
  149. data/templates/project/config.rb +26 -0
  150. data/templates/project/index.html +28 -43
  151. data/templates/project/manifest.rb +21 -28
  152. data/templates/project/scss/_settings.scss +4 -243
  153. data/templates/project/scss/app.scss +37 -44
  154. data/templates/project/scss/normalize.scss +396 -0
  155. data/test/stylesheets/styles.css +955 -0
  156. metadata +144 -153
  157. data/config/deploy.rb +0 -42
  158. data/lib/foundation/generators/layout_generator.rb +0 -28
  159. data/scss/foundation/_settings.scss +0 -281
  160. data/scss/foundation/common/_base.scss +0 -4
  161. data/scss/foundation/common/_forms.scss +0 -117
  162. data/scss/foundation/common/_globals.scss +0 -35
  163. data/scss/foundation/common/_ratios.scss +0 -19
  164. data/scss/foundation/common/_typography.scss +0 -104
  165. data/scss/foundation/components/modules/_all.scss +0 -10
  166. data/scss/foundation/components/modules/_buttons.scss +0 -178
  167. data/scss/foundation/components/modules/_clearing.scss +0 -61
  168. data/scss/foundation/components/modules/_joyride.scss +0 -33
  169. data/scss/foundation/components/modules/_mqueries.scss +0 -458
  170. data/scss/foundation/components/modules/_navbar.scss +0 -74
  171. data/scss/foundation/components/modules/_offcanvas.scss +0 -55
  172. data/scss/foundation/components/modules/_orbit.scss +0 -90
  173. data/scss/foundation/components/modules/_reveal.scss +0 -34
  174. data/scss/foundation/components/modules/_tabs.scss +0 -67
  175. data/scss/foundation/components/modules/_topbar.scss +0 -167
  176. data/scss/foundation/components/modules/_ui.scss +0 -292
  177. data/scss/foundation/functions/_all.scss +0 -2
  178. data/scss/foundation/functions/_convert-number-to-word.scss +0 -10
  179. data/scss/foundation/functions/_grid-calc.scss +0 -5
  180. data/scss/foundation/functions/modular-scale.scss +0 -3
  181. data/scss/foundation/mixins/_all.scss +0 -5
  182. data/scss/foundation/mixins/_clearfix.scss +0 -13
  183. data/scss/foundation/mixins/_css-triangle.scss +0 -22
  184. data/scss/foundation/mixins/_font-size.scss +0 -13
  185. data/scss/foundation/mixins/_respond-to.scss +0 -11
  186. data/scss/foundation/mixins/_semantic-grid.scss +0 -66
  187. data/test/buttons.html +0 -189
  188. data/test/clearing.html +0 -85
  189. data/test/config.rb +0 -11
  190. data/test/elements.html +0 -490
  191. data/test/forms.html +0 -371
  192. data/test/grid.html +0 -543
  193. data/test/images/orbit-demo/demo1.jpeg +0 -0
  194. data/test/images/orbit-demo/demo2.jpeg +0 -0
  195. data/test/images/orbit-demo/demo3.jpeg +0 -0
  196. data/test/images/orbit-demo/slider-background.jpeg +0 -0
  197. data/test/index.html +0 -83
  198. data/test/joyride.html +0 -127
  199. data/test/magellan.html +0 -112
  200. data/test/navigation.html +0 -269
  201. data/test/orbit.html +0 -112
  202. data/test/reveal.html +0 -91
  203. data/test/scss/_settings.scss +0 -245
  204. data/test/scss/styles.scss +0 -50
  205. data/test/tabs.html +0 -197
  206. data/test/template.html +0 -52
  207. data/test/topbar-login.html +0 -194
  208. data/test/topbar.html +0 -139
  209. data/test/type.html +0 -188
  210. data/vendor/assets/images/foundation/orbit/bullets.jpg +0 -0
  211. data/vendor/assets/images/foundation/orbit/left-arrow-small.png +0 -0
  212. data/vendor/assets/images/foundation/orbit/left-arrow.png +0 -0
  213. data/vendor/assets/images/foundation/orbit/loading.gif +0 -0
  214. data/vendor/assets/images/foundation/orbit/mask-black.png +0 -0
  215. data/vendor/assets/images/foundation/orbit/pause-black.png +0 -0
  216. data/vendor/assets/images/foundation/orbit/right-arrow-small.png +0 -0
  217. data/vendor/assets/images/foundation/orbit/right-arrow.png +0 -0
  218. data/vendor/assets/images/foundation/orbit/rotator-black.png +0 -0
  219. data/vendor/assets/images/foundation/orbit/timer-black.png +0 -0
  220. data/vendor/assets/javascripts/foundation/app.js +0 -41
  221. data/vendor/assets/javascripts/foundation/index.js +0 -19
  222. data/vendor/assets/javascripts/foundation/jquery.event.move.js +0 -580
  223. data/vendor/assets/javascripts/foundation/jquery.event.swipe.js +0 -130
  224. data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +0 -47
  225. data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +0 -20
  226. data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +0 -83
  227. data/vendor/assets/javascripts/foundation/jquery.foundation.clearing.js +0 -413
  228. data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +0 -502
  229. data/vendor/assets/javascripts/foundation/jquery.foundation.joyride.js +0 -639
  230. data/vendor/assets/javascripts/foundation/jquery.foundation.magellan.js +0 -96
  231. data/vendor/assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js +0 -27
  232. data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +0 -55
  233. data/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +0 -919
  234. data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +0 -794
  235. data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +0 -66
  236. data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +0 -211
  237. data/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +0 -174
  238. data/vendor/assets/javascripts/foundation/jquery.js +0 -9555
  239. data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +0 -50
@@ -0,0 +1,209 @@
1
+ //
2
+ // Clearing Variables
3
+ //
4
+
5
+ // We use these to set the background colors for parts of Clearing.
6
+ $clearing-bg: #111 !default;
7
+ $clearing-caption-bg: $clearing-bg !default;
8
+ $clearing-carousel-bg: #111 !default;
9
+ $clearing-img-bg: $clearing-bg !default;
10
+
11
+ // We use these to style the close button
12
+ $clearing-close-color: #fff !default;
13
+ $clearing-close-size: 40px !default;
14
+
15
+ // We use these to style the arrows
16
+ $clearing-arrow-size: 16px !default;
17
+ $clearing-arrow-color: $clearing-close-color !default;
18
+
19
+ // We use these to style captions
20
+ $clearing-caption-font-color: #fff !default;
21
+ $clearing-caption-padding: 10px 30px !default;
22
+
23
+ // We use these to make the image and carousel height and style
24
+ $clearing-active-img-height: 75% !default;
25
+ $clearing-carousel-height: 150px !default;
26
+ $clearing-carousel-thumb-width: 175px !default;
27
+ $clearing-carousel-thumb-active-border: 4px solid rgb(255,255,255) !default;
28
+
29
+
30
+ // We decided to not create a mixin for Clearing because it relies
31
+ // on predefined classes and structure to work properly.
32
+ // The variables above should give enough control.
33
+
34
+ /* Clearing Styles */
35
+ [data-clearing] {
36
+ @include clearfix;
37
+ margin-bottom: 0;
38
+ }
39
+
40
+ .clearing-blackout {
41
+ background: $clearing-bg;
42
+ position: fixed;
43
+ width: 100%;
44
+ height: 100%;
45
+ top: 0;
46
+ #{$default-float}: 0;
47
+ z-index: 998;
48
+
49
+ .clearing-close { display: block; }
50
+ }
51
+
52
+ .clearing-container {
53
+ position: relative;
54
+ z-index: 998;
55
+ height: 100%;
56
+ overflow: hidden;
57
+ margin: 0;
58
+ }
59
+
60
+ .visible-img {
61
+ height: 95%;
62
+ position: relative;
63
+
64
+ img {
65
+ position: absolute;
66
+ #{$default-float}: 50%;
67
+ top: 50%;
68
+ margin-#{$default-float}: -50%;
69
+ max-height: 100%;
70
+ max-width: 100%;
71
+ }
72
+ }
73
+
74
+ .clearing-caption {
75
+ color: $clearing-caption-font-color;
76
+ line-height: 1.3;
77
+ margin-bottom: 0;
78
+ text-align: center;
79
+ bottom: 0;
80
+ background: $clearing-caption-bg;
81
+ width: 100%;
82
+ padding: $clearing-caption-padding;
83
+ position: absolute;
84
+ #{$default-float}: 0;
85
+ }
86
+
87
+ .clearing-close {
88
+ z-index: 999;
89
+ padding-left: 20px;
90
+ padding-top: 10px;
91
+ font-size: $clearing-close-size;
92
+ line-height: 1;
93
+ color: $clearing-close-color;
94
+ display: none;
95
+
96
+ &:hover,
97
+ &:focus { color: #ccc; }
98
+ }
99
+
100
+ .clearing-assembled .clearing-container { height: 100%;
101
+ .carousel > ul { display: none; }
102
+ }
103
+
104
+
105
+ // Large screen overrides
106
+ @media #{$small} {
107
+ .clearing-main-left,
108
+ .clearing-main-right {
109
+ position: absolute;
110
+ height: 100%;
111
+ width: 40px;
112
+ top: 0;
113
+ & > span {
114
+ position: absolute;
115
+ top: 50%;
116
+ display: block;
117
+ width: 0;
118
+ height: 0;
119
+ border: solid $clearing-arrow-size;
120
+ }
121
+ }
122
+ .clearing-main-left {
123
+ left: 0;
124
+ & > span {
125
+ left: 5px;
126
+ border-color: transparent $clearing-arrow-color transparent transparent;
127
+ }
128
+ }
129
+ .clearing-main-right {
130
+ right: 0;
131
+ & > span {
132
+ border-color: transparent transparent transparent $clearing-arrow-color;
133
+ }
134
+ }
135
+
136
+ .clearing-main-left.disabled,
137
+ .clearing-main-right.disabled { opacity: 0.5; }
138
+
139
+ // If you want to show a lightbox, but only have a single image come through as the thumbnail
140
+ .clearing-feature ~ li { display: none; }
141
+
142
+ .clearing-assembled .clearing-container {
143
+
144
+ .carousel {
145
+ background: $clearing-carousel-bg;
146
+ height: $clearing-carousel-height;
147
+ margin-top: 5px;
148
+
149
+ & > ul {
150
+ display: block;
151
+ z-index: 999;
152
+ width: 200%;
153
+ height: 100%;
154
+ margin-left: 0;
155
+ position: relative;
156
+ #{$default-float}: 0;
157
+
158
+ li {
159
+ display: block;
160
+ width: $clearing-carousel-thumb-width;
161
+ height: inherit;
162
+ padding: 0;
163
+ float: $default-float;
164
+ overflow: hidden;
165
+ margin-#{$default-opposite}: 1px;
166
+ position: relative;
167
+ cursor: pointer;
168
+ opacity: 0.4;
169
+
170
+ &.fix-height {
171
+ img {
172
+ min-height: 100%;
173
+ height: 100%;
174
+ max-width: none;
175
+ }
176
+ }
177
+
178
+ a.th {
179
+ border: none;
180
+ -webkit-box-shadow: none;
181
+ box-shadow: none;
182
+ display: block;
183
+ }
184
+
185
+ img {
186
+ cursor: pointer !important;
187
+ min-width: 100% !important;
188
+ }
189
+
190
+ &.visible { opacity: 1; }
191
+ }
192
+ }
193
+ }
194
+
195
+ .visible-img {
196
+ background: $clearing-img-bg;
197
+ overflow: hidden;
198
+ height: $clearing-active-img-height;
199
+ }
200
+ }
201
+
202
+ .clearing-close {
203
+ position: absolute;
204
+ top: 10px;
205
+ #{$default-opposite}: 20px;
206
+ padding-left: 0;
207
+ padding-top: 0;
208
+ }
209
+ }
@@ -0,0 +1,232 @@
1
+ //
2
+ // Custom Form Variables
3
+ //
4
+
5
+ // We use these to control the basic form styles input styles
6
+ $custom-form-border-color: #ccc !default;
7
+ $custom-form-bg: #fff !default;
8
+ $custom-form-bg-disabled: #ddd !default;
9
+ $custom-form-check-color: #222 !default;
10
+
11
+ // We use these to style the custom select form element.
12
+ $custom-select-bg: #fff !default;
13
+ $custom-select-fade-to-color: #f3f3f3 !default;
14
+ $custom-select-border-color: #ddd !default;
15
+ $custom-select-triangle-color: #aaa !default;
16
+ $custom-select-triangle-color-open: #222 !default;
17
+ $custom-select-height: emCalc(13px) + ($form-spacing * 1.5) !default;
18
+ $custom-select-margin-bottom: emCalc(20px) !default;
19
+ $custom-select-font-color-selected: #141414 !default;
20
+ $custom-select-disabled-color: #888 !default;
21
+
22
+ // We use these to control the style of the custom select dropdown element.
23
+ $custom-dropdown-height: 200px !default;
24
+ $custom-dropdown-bg: #fff !default;
25
+ $custom-dropdown-border-color: darken(#fff, 20%) !default;
26
+ $custom-dropdown-border-width: 1px !default;
27
+ $custom-dropdown-border-style: solid !default;
28
+ $custom-dropdown-font-color: #555 !default;
29
+ $custom-dropdown-font-size: emCalc(14px) !default;
30
+ $custom-dropdown-color-selected: #eeeeee !default;
31
+ $custom-dropdown-font-color-selected: #000 !default;
32
+ $custom-dropdown-shadow: 0 2px 2px 0px rgba(0,0,0,0.1) !default;
33
+ $custom-dropdown-offset-top: none !default;
34
+ $custom-dropdown-list-padding: emCalc(4px) !default;
35
+ $custom-dropdown-left-padding: emCalc(6px) !default;
36
+ $custom-dropdown-right-padding: emCalc(38px) !default;
37
+ $custom-dropdown-list-item-min-height: emCalc(24px) !default;
38
+
39
+ // We decided not to make a mixin for the custom forms because
40
+ // they rely on a very specific class naming structure.
41
+ // We may look at updating this in the future.
42
+
43
+ /* Custom Checkbox and Radio Inputs */
44
+ form.custom {
45
+ .custom {
46
+ display: inline-block;
47
+ width: 16px;
48
+ height: 16px;
49
+ position: relative;
50
+ top: 2px;
51
+ border: solid 1px $custom-form-border-color;
52
+ background: $custom-form-bg;
53
+
54
+ &.radio { @include radius(1000px); }
55
+
56
+ &.checkbox {
57
+ z-index: -1;
58
+ &:before {
59
+ content: "";
60
+ display: block;
61
+ line-height: 0.8;
62
+ height: 14px;
63
+ width: 14px;
64
+ text-align: center;
65
+ position: absolute;
66
+ top: 0;
67
+ #{$default-float}: 0;
68
+ font-size: 14px;
69
+ color: #fff;
70
+ }
71
+ }
72
+
73
+ &.radio.checked {
74
+ &:before {
75
+ content: "";
76
+ display: block;
77
+ width: 8px;
78
+ height: 8px;
79
+ @include radius(1000px);
80
+ background: $custom-form-check-color;
81
+ position: relative;
82
+ top: 3px;
83
+ #{$default-float}: 3px;
84
+ }
85
+ }
86
+
87
+ &.checkbox.checked {
88
+ &:before {
89
+ content: "\00d7";
90
+ color: $custom-form-check-color;
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ /* Custom Select Options and Dropdowns */
97
+ form.custom {
98
+ .custom.dropdown {
99
+ display: block;
100
+ position: relative;
101
+ top: 0;
102
+ height: $custom-select-height;
103
+ margin-bottom: $custom-select-margin-bottom;
104
+ margin-top: 0px;
105
+ padding: 0px;
106
+ width: 100%;
107
+ background: $custom-dropdown-bg;
108
+ background: -moz-linear-gradient(top, $custom-dropdown-bg 0%, $custom-select-fade-to-color 100%);
109
+ background: -webkit-linear-gradient(top, $custom-dropdown-bg 0%,$custom-select-fade-to-color 100%);
110
+ background: linear-gradient(to bottom, $custom-dropdown-bg 0%,$custom-select-fade-to-color 100%);
111
+ -webkit-box-shadow: none;
112
+ box-shadow: none;
113
+ font-size: emCalc(14px);
114
+
115
+ ul {
116
+ overflow-y: auto;
117
+ max-height: $custom-dropdown-height;
118
+ }
119
+
120
+ .current {
121
+ cursor:default;
122
+ white-space: nowrap;
123
+ line-height: $custom-select-height - emCalc(1px);
124
+ color: $input-font-color;
125
+ text-decoration: none;
126
+ overflow: hidden;
127
+ display: block;
128
+ margin-left: $form-spacing / 2;
129
+ margin-right: $custom-select-height;
130
+ }
131
+
132
+ .selector {
133
+ cursor:default;
134
+ position: absolute;
135
+ width: $form-spacing * 2.5;
136
+ height: $custom-select-height;
137
+ display: block;
138
+ #{$default-opposite}: 0;
139
+ top: 0;
140
+ &:after {
141
+ content: "";
142
+ display: block;
143
+ @include css-triangle(5px, $custom-select-triangle-color, top);
144
+ position: absolute;
145
+ left: ($form-spacing * 2.5) / 2 - emCalc(5px);
146
+ top: 50%;
147
+ margin-top: -3px;
148
+ }
149
+ }
150
+
151
+ &:hover, &.open {
152
+ a.selector {
153
+ &:after { @include css-triangle(5px, $custom-select-triangle-color-open, top); }
154
+ }
155
+ }
156
+
157
+ .disabled {
158
+ color: $custom-select-disabled-color;
159
+ &:hover {
160
+ background: transparent;
161
+ color: $custom-select-disabled-color;
162
+ &:after { display: none; }
163
+ }
164
+ }
165
+
166
+ &.open ul {
167
+ display: block;
168
+ z-index: 10;
169
+ min-width:100%;
170
+ @include box-sizing(content-box);
171
+ }
172
+
173
+ &.small { max-width: 134px !important; }
174
+ &.medium { max-width: 254px !important; }
175
+ &.large { max-width: 434px !important; }
176
+ &.expand { width: 100% !important; }
177
+
178
+ &.open.small ul { max-width: 134px !important; @include box-sizing(border-box); }
179
+ &.open.medium ul { max-width: 254px !important; @include box-sizing(border-box); }
180
+ &.open.large ul { max-width: 634px !important; @include box-sizing(border-box); }
181
+ }
182
+
183
+ .custom.dropdown ul {
184
+ position: absolute;
185
+ width: auto;
186
+ display: none;
187
+ margin: 0;
188
+ #{$default-float}: -$input-border-width;
189
+ top: $custom-dropdown-offset-top;
190
+ -webkit-box-shadow: $custom-dropdown-shadow;
191
+ box-shadow: $custom-dropdown-shadow;
192
+ margin: 0;
193
+ padding: 0;
194
+ background: $custom-dropdown-bg;
195
+ border: $custom-dropdown-border-style $custom-dropdown-border-width $custom-dropdown-border-color;
196
+ font-size: $em-base;
197
+
198
+ li {
199
+ color: $custom-dropdown-font-color;
200
+ font-size: $custom-dropdown-font-size;
201
+ cursor: default;
202
+ padding-top: $custom-dropdown-list-padding;
203
+ padding-bottom: $custom-dropdown-list-padding;
204
+ padding-#{$default-float}: $custom-dropdown-left-padding;
205
+ padding-#{$default-opposite}: $custom-dropdown-right-padding;
206
+ min-height: $custom-dropdown-list-item-min-height;
207
+ line-height: $custom-dropdown-list-item-min-height;
208
+ margin: 0;
209
+ white-space: nowrap;
210
+ list-style: none;
211
+
212
+ &.selected {
213
+ background: $custom-dropdown-color-selected;
214
+ color: $custom-dropdown-font-color-selected;
215
+ }
216
+ &:hover {
217
+ background-color: darken($custom-dropdown-color-selected, 4%);
218
+ color: $custom-dropdown-font-color-selected;
219
+ }
220
+ &.selected:hover {
221
+ background: $custom-dropdown-color-selected;
222
+ cursor: default;
223
+ color: $custom-dropdown-font-color-selected;
224
+ }
225
+ }
226
+
227
+ &.show { display: block; }
228
+ }
229
+
230
+ /* Custom input, disabled */
231
+ .custom.disabled { background-color: $custom-form-bg-disabled; }
232
+ }
@@ -0,0 +1,114 @@
1
+ //
2
+ // Dropdown Button Variables
3
+ //
4
+
5
+ // We use these to set the color of the pip in dropdown buttons
6
+ $dropdown-button-pip-color: #fff !default;
7
+ $dropdown-button-pip-color-alt: #333 !default;
8
+
9
+ // We use these to style tiny dropdown buttons
10
+ $dropdown-button-padding-tny: $button-tny * 5 !default;
11
+ $dropdown-button-pip-size-tny: $button-tny !default;
12
+ $dropdown-button-pip-right-tny: $button-tny * 2 !default;
13
+ $dropdown-button-pip-top-tny: -$button-tny / 2 + emCalc(1px) !default;
14
+
15
+ // We use these to style small dropdown buttons
16
+ $dropdown-button-padding-sml: $button-sml * 5 !default;
17
+ $dropdown-button-pip-size-sml: $button-sml !default;
18
+ $dropdown-button-pip-right-sml: $button-sml * 2 !default;
19
+ $dropdown-button-pip-top-sml: -$button-sml / 2 + emCalc(1px) !default;
20
+
21
+ // We use these to style medium dropdown buttons
22
+ $dropdown-button-padding-med: $button-med * 4 + emCalc(3px) !default;
23
+ $dropdown-button-pip-size-med: $button-med - emCalc(3px) !default;
24
+ $dropdown-button-pip-right-med: $button-med * 2 !default;
25
+ $dropdown-button-pip-top-med: -$button-med / 2 + emCalc(2px) !default;
26
+
27
+ // We use these to style large dropdown buttons
28
+ $dropdown-button-padding-lrg: $button-lrg * 4 !default;
29
+ $dropdown-button-pip-size-lrg: $button-lrg - emCalc(6px) !default;
30
+ $dropdown-button-pip-right-lrg: $button-lrg + emCalc(12px) !default;
31
+ $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px) !default;
32
+
33
+ //
34
+ // Dropdown Button Mixin
35
+ //
36
+
37
+ // We use this mixin to build off of the button mixin and add dropdown button styles
38
+ @mixin dropdown-button($padding:medium, $pip-color:#fff, $base-style:true) {
39
+
40
+ // We add in base styles, but they can be negated by setting to 'false'.
41
+ @if $base-style {
42
+ position: relative;
43
+
44
+ // This creates the base styles for the triangle pip
45
+ &:before {
46
+ position: absolute;
47
+ content: "";
48
+ width: 0;
49
+ height: 0;
50
+ display: block;
51
+ border-style: solid;
52
+ border-color: $dropdown-button-pip-color transparent transparent transparent;
53
+ top: 50%;
54
+ }
55
+ }
56
+
57
+ // If we're dealing with tiny buttons, use these styles
58
+ @if $padding == tiny {
59
+ padding-#{$default-opposite}: $dropdown-button-padding-tny;
60
+ &:before {
61
+ border-width: $dropdown-button-pip-size-tny;
62
+ right: $dropdown-button-pip-right-tny;
63
+ margin-top: $dropdown-button-pip-top-tny;
64
+ }
65
+ }
66
+
67
+ // If we're dealing with small buttons, use these styles
68
+ @if $padding == small {
69
+ padding-#{$default-opposite}: $dropdown-button-padding-sml;
70
+ &:before {
71
+ border-width: $dropdown-button-pip-size-sml;
72
+ right: $dropdown-button-pip-right-sml;
73
+ margin-top: $dropdown-button-pip-top-sml;
74
+ }
75
+ }
76
+
77
+ // If we're dealing with default (medium) buttons, use these styles
78
+ @if $padding == medium {
79
+ padding-#{$default-opposite}: $dropdown-button-padding-med;
80
+ &:before {
81
+ border-width: $dropdown-button-pip-size-med;
82
+ right: $dropdown-button-pip-right-med;
83
+ margin-top: $dropdown-button-pip-top-med;
84
+ }
85
+ }
86
+
87
+ // If we're dealing with large buttons, use these styles
88
+ @if $padding == large {
89
+ padding-#{$default-opposite}: $dropdown-button-padding-lrg;
90
+ &:before {
91
+ border-width: $dropdown-button-pip-size-lrg;
92
+ right: $dropdown-button-pip-right-lrg;
93
+ margin-top: $dropdown-button-pip-top-lrg;
94
+ }
95
+ }
96
+
97
+ // We can control the pip color. We didn't use logic in this case, just set it and forget it.
98
+ @if $pip-color {
99
+ &:before { border-color: $pip-color transparent transparent transparent; }
100
+ }
101
+ }
102
+
103
+
104
+ @if $include-html-classes {
105
+
106
+ /* Dropdown Button */
107
+ .dropdown.button { @include dropdown-button;
108
+ &.tiny { @include dropdown-button(tiny,$base-style:false); }
109
+ &.small { @include dropdown-button(small,$base-style:false); }
110
+ &.large { @include dropdown-button(large,$base-style:false); }
111
+ &.secondary:before { border-color: $dropdown-button-pip-color-alt transparent transparent transparent; }
112
+ }
113
+
114
+ }