modularis 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +24 -0
  3. data/.idea/scopes/scope_settings.xml +5 -0
  4. data/.rbenv-version +1 -0
  5. data/CONTRIBUTING.md +53 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +19 -0
  8. data/Gruntfile.js +27 -0
  9. data/LICENSE +22 -0
  10. data/README.md +27 -0
  11. data/Rakefile +2 -0
  12. data/docs/CHANGELOG.md +260 -0
  13. data/docs/Capfile +4 -0
  14. data/docs/Gemfile +13 -0
  15. data/docs/Gemfile.lock +45 -0
  16. data/docs/Procfile +2 -0
  17. data/docs/README.md +1 -0
  18. data/docs/_sidebar-components.html.erb +115 -0
  19. data/docs/_sidebar.html.erb +115 -0
  20. data/docs/changelog.html.erb +33 -0
  21. data/docs/compile.rb +34 -0
  22. data/docs/components/alert-boxes.html.erb +204 -0
  23. data/docs/components/block-grid.html.erb +132 -0
  24. data/docs/components/breadcrumbs.html.erb +156 -0
  25. data/docs/components/button-groups.html.erb +230 -0
  26. data/docs/components/buttons.html.erb +222 -0
  27. data/docs/components/clearing.html.erb +152 -0
  28. data/docs/components/custom-forms.html.erb +309 -0
  29. data/docs/components/dropdown-buttons.html.erb +235 -0
  30. data/docs/components/dropdown.html.erb +188 -0
  31. data/docs/components/flex-video.html.erb +95 -0
  32. data/docs/components/forms.html.erb +477 -0
  33. data/docs/components/global.html.erb +92 -0
  34. data/docs/components/grid.html.erb +366 -0
  35. data/docs/components/inline-lists.html.erb +91 -0
  36. data/docs/components/joyride.html.erb +183 -0
  37. data/docs/components/keystrokes.html.erb +76 -0
  38. data/docs/components/kitchen-sink.html.erb +870 -0
  39. data/docs/components/labels.html.erb +102 -0
  40. data/docs/components/magellan.html.erb +86 -0
  41. data/docs/components/orbit.html.erb +276 -0
  42. data/docs/components/pagination.html.erb +183 -0
  43. data/docs/components/panels.html.erb +123 -0
  44. data/docs/components/pricing-tables.html.erb +156 -0
  45. data/docs/components/progress-bars.html.erb +123 -0
  46. data/docs/components/reveal.html.erb +162 -0
  47. data/docs/components/section.html.erb +496 -0
  48. data/docs/components/side-nav.html.erb +124 -0
  49. data/docs/components/split-buttons.html.erb +220 -0
  50. data/docs/components/sub-nav.html.erb +122 -0
  51. data/docs/components/switch.html.erb +290 -0
  52. data/docs/components/tables.html.erb +125 -0
  53. data/docs/components/thumbnails.html.erb +89 -0
  54. data/docs/components/tooltips.html.erb +75 -0
  55. data/docs/components/top-bar.html.erb +283 -0
  56. data/docs/components/type.html.erb +396 -0
  57. data/docs/components/visibility.html.erb +110 -0
  58. data/docs/config/deploy.rb +36 -0
  59. data/docs/config.ru +12 -0
  60. data/docs/controller.rb +53 -0
  61. data/docs/css/_coderay.scss +116 -0
  62. data/docs/css/_settings.scss +1 -0
  63. data/docs/css/docs.scss +185 -0
  64. data/docs/css/normalize.scss +396 -0
  65. data/docs/css/qunit-composite.css +13 -0
  66. data/docs/css/qunit.css +235 -0
  67. data/docs/faq.html.erb +63 -0
  68. data/docs/img/demos/demo1-th.jpg +0 -0
  69. data/docs/img/demos/demo1.jpg +0 -0
  70. data/docs/img/demos/demo2-th.jpg +0 -0
  71. data/docs/img/demos/demo2.jpg +0 -0
  72. data/docs/img/demos/demo3-th.jpg +0 -0
  73. data/docs/img/demos/demo3.jpg +0 -0
  74. data/docs/img/demos/demo4-th.jpg +0 -0
  75. data/docs/img/demos/demo4.jpg +0 -0
  76. data/docs/img/demos/demo5-th.jpg +0 -0
  77. data/docs/img/demos/demo5.jpg +0 -0
  78. data/docs/index.html.erb +285 -0
  79. data/docs/javascript.html.erb +134 -0
  80. data/docs/js/docs.js +3 -0
  81. data/docs/js/qunit-composite.js +105 -0
  82. data/docs/js/qunit.js +1977 -0
  83. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  84. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  85. data/docs/js/tests/tooltips/tooltips.html +39 -0
  86. data/docs/js/tests/tooltips/tooltips.js +11 -0
  87. data/docs/layout.html.erb +128 -0
  88. data/docs/media-queries.html.erb +96 -0
  89. data/docs/rails.html.erb +76 -0
  90. data/docs/rtl.html.erb +53 -0
  91. data/docs/sass.html.erb +1295 -0
  92. data/docs/support.html.erb +143 -0
  93. data/docs/test/_test-scripts.html.erb +36 -0
  94. data/docs/test/cards.html.erb +77 -0
  95. data/docs/test/flexbox-grid.html.erb +68 -0
  96. data/docs/test/flip-nav.html.erb +54 -0
  97. data/docs/test/layout.html.erb +15 -0
  98. data/docs/test/off-canvas1.html.erb +64 -0
  99. data/docs/test/off-canvas2.html.erb +75 -0
  100. data/docs/test/off-canvas3.html.erb +65 -0
  101. data/docs/test_layout.html.erb +128 -0
  102. data/js/modularis/index.js +18 -0
  103. data/js/vendor/custom.modernizr.js +4 -0
  104. data/js/vendor/jquery.js +9597 -0
  105. data/js/vendor/zepto.js +1884 -0
  106. data/lib/modularis/engine.rb +18 -0
  107. data/lib/modularis/generators/USAGE +15 -0
  108. data/lib/modularis/generators/install_generator.rb +54 -0
  109. data/lib/modularis/generators/templates/application.html.erb +46 -0
  110. data/lib/modularis/generators/templates/application.html.haml +31 -0
  111. data/lib/modularis/generators/templates/application.html.slim +28 -0
  112. data/lib/modularis/version.rb +3 -0
  113. data/lib/modularis.rb +17 -0
  114. data/modularis.gemspec +20 -0
  115. data/package.json +15 -0
  116. data/scss/compagecss/_variables.scss +1192 -0
  117. data/scss/compagecss/components/_alert-boxes.scss +106 -0
  118. data/scss/compagecss/components/_block-grid.scss +70 -0
  119. data/scss/compagecss/components/_breadcrumbs.scss +124 -0
  120. data/scss/compagecss/components/_button-groups.scss +88 -0
  121. data/scss/compagecss/components/_buttons.scss +226 -0
  122. data/scss/compagecss/components/_clearing.scss +217 -0
  123. data/scss/compagecss/components/_custom-forms.scss +246 -0
  124. data/scss/compagecss/components/_dropdown-buttons.scss +114 -0
  125. data/scss/compagecss/components/_dropdown.scss +149 -0
  126. data/scss/compagecss/components/_flex-video.scss +45 -0
  127. data/scss/compagecss/components/_flexbox-grid.scss +225 -0
  128. data/scss/compagecss/components/_flip.scss +105 -0
  129. data/scss/compagecss/components/_forms.scss +361 -0
  130. data/scss/compagecss/components/_global.scss +289 -0
  131. data/scss/compagecss/components/_grid.scss +184 -0
  132. data/scss/compagecss/components/_inline-lists.scss +52 -0
  133. data/scss/compagecss/components/_joyride.scss +210 -0
  134. data/scss/compagecss/components/_keystrokes.scss +56 -0
  135. data/scss/compagecss/components/_labels.scss +84 -0
  136. data/scss/compagecss/components/_magellan.scss +21 -0
  137. data/scss/compagecss/components/_off-canvas.scss +86 -0
  138. data/scss/compagecss/components/_orbit.scss +209 -0
  139. data/scss/compagecss/components/_pagination.scss +99 -0
  140. data/scss/compagecss/components/_panels.scss +76 -0
  141. data/scss/compagecss/components/_pricing-tables.scss +130 -0
  142. data/scss/compagecss/components/_progress-bars.scss +70 -0
  143. data/scss/compagecss/components/_reveal.scss +131 -0
  144. data/scss/compagecss/components/_section.scss +303 -0
  145. data/scss/compagecss/components/_side-nav.scss +68 -0
  146. data/scss/compagecss/components/_split-buttons.scss +166 -0
  147. data/scss/compagecss/components/_sub-nav.scss +67 -0
  148. data/scss/compagecss/components/_switch.scss +249 -0
  149. data/scss/compagecss/components/_tables.scss +80 -0
  150. data/scss/compagecss/components/_thumbs.scss +47 -0
  151. data/scss/compagecss/components/_tooltips.scss +113 -0
  152. data/scss/compagecss/components/_top-bar.scss +462 -0
  153. data/scss/compagecss/components/_type.scss +422 -0
  154. data/scss/compagecss/components/_visibility.scss +320 -0
  155. data/scss/modularis.scss +49 -0
  156. data/scss/normalize.scss +402 -0
  157. data/templates/project/.gitignore +44 -0
  158. data/templates/project/MIT-LICENSE.txt +20 -0
  159. data/templates/project/config.rb +26 -0
  160. data/templates/project/humans.txt +8 -0
  161. data/templates/project/index.html +124 -0
  162. data/templates/project/manifest.rb +44 -0
  163. data/templates/project/robots.txt +4 -0
  164. data/templates/project/scss/app.scss +48 -0
  165. data/templates/upgrade/manifest.rb +34 -0
  166. metadata +235 -0
@@ -0,0 +1,217 @@
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
+ list-style: none;
39
+
40
+ li {
41
+ float: $default-float;
42
+ margin-#{$opposite-direction}: 10px;
43
+ }
44
+ }
45
+
46
+ .clearing-blackout {
47
+ background: $clearing-bg;
48
+ position: fixed;
49
+ width: 100%;
50
+ height: 100%;
51
+ top: 0;
52
+ #{$default-float}: 0;
53
+ z-index: 998;
54
+
55
+ .clearing-close { display: block; }
56
+ }
57
+
58
+ .clearing-container {
59
+ position: relative;
60
+ z-index: 998;
61
+ height: 100%;
62
+ overflow: hidden;
63
+ margin: 0;
64
+ }
65
+
66
+ .visible-img {
67
+ height: 95%;
68
+ position: relative;
69
+
70
+ img {
71
+ position: absolute;
72
+ #{$default-float}: 50%;
73
+ top: 50%;
74
+ margin-#{$default-float}: -50%;
75
+ max-height: 100%;
76
+ max-width: 100%;
77
+ }
78
+ }
79
+
80
+ .clearing-caption {
81
+ color: $clearing-caption-font-color;
82
+ line-height: 1.3;
83
+ margin-bottom: 0;
84
+ text-align: center;
85
+ bottom: 0;
86
+ background: $clearing-caption-bg;
87
+ width: 100%;
88
+ padding: $clearing-caption-padding;
89
+ position: absolute;
90
+ #{$default-float}: 0;
91
+ }
92
+
93
+ .clearing-close {
94
+ z-index: 999;
95
+ padding-#{$default-float}: 20px;
96
+ padding-top: 10px;
97
+ font-size: $clearing-close-size;
98
+ line-height: 1;
99
+ color: $clearing-close-color;
100
+ display: none;
101
+
102
+ &:hover,
103
+ &:focus { color: #ccc; }
104
+ }
105
+
106
+ .clearing-assembled .clearing-container { height: 100%;
107
+ .carousel > ul { display: none; }
108
+ }
109
+
110
+
111
+ // Large screen overrides
112
+ @media #{$small} {
113
+ .clearing-main-prev,
114
+ .clearing-main-next {
115
+ position: absolute;
116
+ height: 100%;
117
+ width: 40px;
118
+ top: 0;
119
+ & > span {
120
+ position: absolute;
121
+ top: 50%;
122
+ display: block;
123
+ width: 0;
124
+ height: 0;
125
+ border: solid $clearing-arrow-size;
126
+ }
127
+ }
128
+ .clearing-main-prev {
129
+ #{$default-float}: 0;
130
+ & > span {
131
+ #{$default-float}: 5px;
132
+ border-color: transparent;
133
+ border-#{$opposite-direction}-color: $clearing-arrow-color;
134
+ }
135
+ }
136
+ .clearing-main-next {
137
+ #{$opposite-direction}: 0;
138
+ & > span {
139
+ border-color: transparent;
140
+ border-#{$default-float}-color: $clearing-arrow-color;
141
+ }
142
+ }
143
+
144
+ .clearing-main-prev.disabled,
145
+ .clearing-main-next.disabled { opacity: 0.5; }
146
+
147
+ // If you want to show a lightbox, but only have a single image come through as the thumbnail
148
+ .clearing-feature ~ li { display: none; }
149
+
150
+ .clearing-assembled .clearing-container {
151
+
152
+ .carousel {
153
+ background: $clearing-carousel-bg;
154
+ height: $clearing-carousel-height;
155
+ margin-top: 5px;
156
+
157
+ & > ul {
158
+ display: block;
159
+ z-index: 999;
160
+ width: 200%;
161
+ height: 100%;
162
+ margin-#{$default-float}: 0;
163
+ position: relative;
164
+ #{$default-float}: 0;
165
+
166
+ li {
167
+ display: block;
168
+ width: $clearing-carousel-thumb-width;
169
+ height: inherit;
170
+ padding: 0;
171
+ float: $default-float;
172
+ overflow: hidden;
173
+ margin-#{$opposite-direction}: 1px;
174
+ position: relative;
175
+ cursor: pointer;
176
+ opacity: 0.4;
177
+
178
+ &.fix-height {
179
+ img {
180
+ min-height: 100%;
181
+ height: 100%;
182
+ max-width: none;
183
+ }
184
+ }
185
+
186
+ a.th {
187
+ border: none;
188
+ -webkit-box-shadow: none;
189
+ box-shadow: none;
190
+ display: block;
191
+ }
192
+
193
+ img {
194
+ cursor: pointer !important;
195
+ min-width: 100% !important;
196
+ }
197
+
198
+ &.visible { opacity: 1; }
199
+ }
200
+ }
201
+ }
202
+
203
+ .visible-img {
204
+ background: $clearing-img-bg;
205
+ overflow: hidden;
206
+ height: $clearing-active-img-height;
207
+ }
208
+ }
209
+
210
+ .clearing-close {
211
+ position: absolute;
212
+ top: 10px;
213
+ #{$opposite-direction}: 20px;
214
+ padding-#{$default-float}: 0;
215
+ padding-top: 0;
216
+ }
217
+ }
@@ -0,0 +1,246 @@
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: auto !default;
34
+ $custom-dropdown-list-padding: emCalc(4px) !default;
35
+ $custom-dropdown-default-float-padding: emCalc(6px) !default;
36
+ $custom-dropdown-opposite-padding: emCalc(38px) !default;
37
+ $custom-dropdown-list-item-min-height: emCalc(24px) !default;
38
+ $custom-dropdown-width-small: 134px !default;
39
+ $custom-dropdown-width-medium: 254px !default;
40
+ $custom-dropdown-width-large: 434px !default;
41
+
42
+ // We decided not to make a mixin for the custom forms because
43
+ // they rely on a very specific class naming structure.
44
+ // We may look at updating this in the future.
45
+
46
+ // Only include these classes if the variable is true, otherwise they'll be left out.
47
+ @if $include-html-button-classes != false {
48
+
49
+ /* Custom Checkbox and Radio Inputs */
50
+ form.custom {
51
+
52
+ .hidden-field {
53
+ margin-#{$default-float}: -99999px;
54
+ position: absolute;
55
+ visibility: hidden;
56
+ }
57
+
58
+ .custom {
59
+ display: inline-block;
60
+ width: 16px;
61
+ height: 16px;
62
+ position: relative;
63
+ top: 2px;
64
+ border: solid 1px $custom-form-border-color;
65
+ background: $custom-form-bg;
66
+
67
+ &.radio { @include radius(1000px); }
68
+
69
+ &.checkbox {
70
+ &:before {
71
+ content: "";
72
+ display: block;
73
+ line-height: 0.8;
74
+ height: 14px;
75
+ width: 14px;
76
+ text-align: center;
77
+ position: absolute;
78
+ top: 0;
79
+ #{$default-float}: 0;
80
+ font-size: 14px;
81
+ color: #fff;
82
+ }
83
+ }
84
+
85
+ &.radio.checked {
86
+ &:before {
87
+ content: "";
88
+ display: block;
89
+ width: 8px;
90
+ height: 8px;
91
+ @include radius(1000px);
92
+ background: $custom-form-check-color;
93
+ position: relative;
94
+ top: 3px;
95
+ #{$default-float}: 3px;
96
+ }
97
+ }
98
+
99
+ &.checkbox.checked {
100
+ &:before {
101
+ content: "\00d7";
102
+ color: $custom-form-check-color;
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ /* Custom Select Options and Dropdowns */
109
+ form.custom {
110
+ .custom.dropdown {
111
+ display: block;
112
+ position: relative;
113
+ top: 0;
114
+ height: $custom-select-height;
115
+ margin-bottom: $custom-select-margin-bottom;
116
+ margin-top: 0px;
117
+ padding: 0px;
118
+ width: 100%;
119
+ background: $custom-dropdown-bg;
120
+ background: -moz-linear-gradient(top, $custom-dropdown-bg 0%, $custom-select-fade-to-color 100%);
121
+ background: -webkit-linear-gradient(top, $custom-dropdown-bg 0%,$custom-select-fade-to-color 100%);
122
+ background: linear-gradient(to bottom, $custom-dropdown-bg 0%,$custom-select-fade-to-color 100%);
123
+ -webkit-box-shadow: none;
124
+ box-shadow: none;
125
+ font-size: $custom-dropdown-font-size;
126
+ vertical-align: top;
127
+
128
+ ul {
129
+ overflow-y: auto;
130
+ max-height: $custom-dropdown-height;
131
+ }
132
+
133
+ .current {
134
+ cursor:default;
135
+ white-space: nowrap;
136
+ line-height: $custom-select-height - emCalc(1px);
137
+ color: $input-font-color;
138
+ text-decoration: none;
139
+ overflow: hidden;
140
+ display: block;
141
+ margin-#{$default-float}: $form-spacing / 2;
142
+ margin-#{$opposite-direction}: $custom-select-height;
143
+ }
144
+
145
+ .selector {
146
+ cursor:default;
147
+ position: absolute;
148
+ width: $form-spacing * 2.5;
149
+ height: $custom-select-height;
150
+ display: block;
151
+ #{$opposite-direction}: 0;
152
+ top: 0;
153
+ &:after {
154
+ content: "";
155
+ display: block;
156
+ @include css-triangle(5px, $custom-select-triangle-color, top);
157
+ position: absolute;
158
+ #{$default-float}: ($form-spacing * 2.5) / 2 - emCalc(5px);
159
+ top: 50%;
160
+ margin-top: -3px;
161
+ }
162
+ }
163
+
164
+ &:hover, &.open {
165
+ a.selector {
166
+ &:after { @include css-triangle(5px, $custom-select-triangle-color-open, top); }
167
+ }
168
+ }
169
+
170
+ .disabled {
171
+ color: $custom-select-disabled-color;
172
+ &:hover {
173
+ background: transparent;
174
+ color: $custom-select-disabled-color;
175
+ &:after { display: none; }
176
+ }
177
+ }
178
+
179
+ &.open ul {
180
+ display: block;
181
+ z-index: 10;
182
+ min-width:100%;
183
+ @include box-sizing(content-box);
184
+ }
185
+
186
+ &.small { max-width: $custom-dropdown-width-small; }
187
+ &.medium { max-width: $custom-dropdown-width-medium; }
188
+ &.large { max-width: $custom-dropdown-width-large; }
189
+ &.expand { width: 100% !important; }
190
+
191
+ &.open.small ul { min-width: $custom-dropdown-width-small; @include box-sizing(border-box); }
192
+ &.open.medium ul { min-width: $custom-dropdown-width-medium; @include box-sizing(border-box); }
193
+ &.open.large ul { min-width: $custom-dropdown-width-large; @include box-sizing(border-box); }
194
+ }
195
+
196
+ .custom.dropdown ul {
197
+ position: absolute;
198
+ width: auto;
199
+ display: none;
200
+ margin: 0;
201
+ #{$default-float}: -$input-border-width;
202
+ top: $custom-dropdown-offset-top;
203
+ -webkit-box-shadow: $custom-dropdown-shadow;
204
+ box-shadow: $custom-dropdown-shadow;
205
+ margin: 0;
206
+ padding: 0;
207
+ background: $custom-dropdown-bg;
208
+ border: $custom-dropdown-border-style $custom-dropdown-border-width $custom-dropdown-border-color;
209
+ font-size: $em-base;
210
+
211
+ li {
212
+ color: $custom-dropdown-font-color;
213
+ font-size: $custom-dropdown-font-size;
214
+ cursor: default;
215
+ padding-top: $custom-dropdown-list-padding;
216
+ padding-bottom: $custom-dropdown-list-padding;
217
+ padding-#{$default-float}: $custom-dropdown-default-float-padding;
218
+ padding-#{$opposite-direction}: $custom-dropdown-opposite-padding;
219
+ min-height: $custom-dropdown-list-item-min-height;
220
+ line-height: $custom-dropdown-list-item-min-height;
221
+ margin: 0;
222
+ white-space: nowrap;
223
+ list-style: none;
224
+
225
+ &.selected {
226
+ background: $custom-dropdown-color-selected;
227
+ color: $custom-dropdown-font-color-selected;
228
+ }
229
+ &:hover {
230
+ background-color: darken($custom-dropdown-color-selected, 4%);
231
+ color: $custom-dropdown-font-color-selected;
232
+ }
233
+ &.selected:hover {
234
+ background: $custom-dropdown-color-selected;
235
+ cursor: default;
236
+ color: $custom-dropdown-font-color-selected;
237
+ }
238
+ }
239
+
240
+ &.show { display: block; }
241
+ }
242
+
243
+ /* Custom input, disabled */
244
+ .custom.disabled { background-color: $custom-form-bg-disabled; }
245
+ }
246
+ }
@@ -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-opposite-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-opposite-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-opposite-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-opposite-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-#{$opposite-direction}: $dropdown-button-padding-tny;
60
+ &:before {
61
+ border-width: $dropdown-button-pip-size-tny;
62
+ #{$opposite-direction}: $dropdown-button-pip-opposite-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-#{$opposite-direction}: $dropdown-button-padding-sml;
70
+ &:before {
71
+ border-width: $dropdown-button-pip-size-sml;
72
+ #{$opposite-direction}: $dropdown-button-pip-opposite-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-#{$opposite-direction}: $dropdown-button-padding-med;
80
+ &:before {
81
+ border-width: $dropdown-button-pip-size-med;
82
+ #{$opposite-direction}: $dropdown-button-pip-opposite-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-#{$opposite-direction}: $dropdown-button-padding-lrg;
90
+ &:before {
91
+ border-width: $dropdown-button-pip-size-lrg;
92
+ #{$opposite-direction}: $dropdown-button-pip-opposite-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-button-classes != false {
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
+ }