locomotivecms_wagon 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/generators/foundation5/public/stylesheets/foundation/_functions.scss +3 -2
  3. data/generators/foundation5/public/stylesheets/foundation/_settings.scss +419 -274
  4. data/generators/foundation5/public/stylesheets/foundation/components/_accordion.scss +110 -6
  5. data/generators/foundation5/public/stylesheets/foundation/components/_alert-boxes.scss +4 -2
  6. data/generators/foundation5/public/stylesheets/foundation/components/_block-grid.scss +2 -2
  7. data/generators/foundation5/public/stylesheets/foundation/components/_breadcrumbs.scss +8 -3
  8. data/generators/foundation5/public/stylesheets/foundation/components/_button-groups.scss +98 -9
  9. data/generators/foundation5/public/stylesheets/foundation/components/_buttons.scss +66 -29
  10. data/generators/foundation5/public/stylesheets/foundation/components/_clearing.scss +5 -5
  11. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown-buttons.scss +11 -10
  12. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown.scss +49 -35
  13. data/generators/foundation5/public/stylesheets/foundation/components/_forms.scss +125 -38
  14. data/generators/foundation5/public/stylesheets/foundation/components/_global.scss +64 -38
  15. data/generators/foundation5/public/stylesheets/foundation/components/_grid.scss +19 -4
  16. data/generators/foundation5/public/stylesheets/foundation/components/_icon-bar.scss +293 -0
  17. data/generators/foundation5/public/stylesheets/foundation/components/_joyride.scss +11 -9
  18. data/generators/foundation5/public/stylesheets/foundation/components/_keystrokes.scss +4 -4
  19. data/generators/foundation5/public/stylesheets/foundation/components/_labels.scss +5 -3
  20. data/generators/foundation5/public/stylesheets/foundation/components/_magellan.scss +1 -1
  21. data/generators/foundation5/public/stylesheets/foundation/components/_offcanvas.scss +190 -33
  22. data/generators/foundation5/public/stylesheets/foundation/components/_orbit.scss +92 -147
  23. data/generators/foundation5/public/stylesheets/foundation/components/_pagination.scss +22 -10
  24. data/generators/foundation5/public/stylesheets/foundation/components/_panels.scss +12 -7
  25. data/generators/foundation5/public/stylesheets/foundation/components/_pricing-tables.scss +11 -11
  26. data/generators/foundation5/public/stylesheets/foundation/components/_progress-bars.scss +2 -2
  27. data/generators/foundation5/public/stylesheets/foundation/components/_range-slider.scss +29 -9
  28. data/generators/foundation5/public/stylesheets/foundation/components/_reveal.scss +62 -56
  29. data/generators/foundation5/public/stylesheets/foundation/components/_side-nav.scss +3 -2
  30. data/generators/foundation5/public/stylesheets/foundation/components/_split-buttons.scss +2 -2
  31. data/generators/foundation5/public/stylesheets/foundation/components/_sub-nav.scss +4 -6
  32. data/generators/foundation5/public/stylesheets/foundation/components/_switches.scss +230 -0
  33. data/generators/foundation5/public/stylesheets/foundation/components/_tables.scss +13 -7
  34. data/generators/foundation5/public/stylesheets/foundation/components/_tabs.scss +22 -8
  35. data/generators/foundation5/public/stylesheets/foundation/components/_thumbs.scss +2 -4
  36. data/generators/foundation5/public/stylesheets/foundation/components/_toolbar.scss +70 -0
  37. data/generators/foundation5/public/stylesheets/foundation/components/_tooltips.scss +9 -7
  38. data/generators/foundation5/public/stylesheets/foundation/components/_top-bar.scss +82 -56
  39. data/generators/foundation5/public/stylesheets/foundation/components/_type.scss +23 -11
  40. data/generators/foundation5/public/stylesheets/foundation/components/_visibility.scss +7 -7
  41. data/generators/foundation5/public/stylesheets/foundation.css +4327 -3587
  42. data/generators/foundation5/public/stylesheets/foundation.css.scss +38 -38
  43. data/generators/foundation5/public/stylesheets/normalize.css +71 -139
  44. data/generators/foundation5/public/stylesheets/normalize.css.scss +5 -3
  45. data/lib/locomotive/wagon/cli.rb +24 -1
  46. data/lib/locomotive/wagon/generators/content_type.rb +4 -1
  47. data/lib/locomotive/wagon/generators/page.rb +10 -5
  48. data/lib/locomotive/wagon/generators/relationship.rb +100 -0
  49. data/lib/locomotive/wagon/generators/site/foundation5.rb +2 -2
  50. data/lib/locomotive/wagon/generators/snippet.rb +3 -3
  51. data/lib/locomotive/wagon/liquid/tags/locale_switcher.rb +2 -2
  52. data/lib/locomotive/wagon/version.rb +1 -1
  53. data/lib/locomotive/wagon.rb +1 -0
  54. data/locomotivecms_wagon.gemspec +1 -1
  55. data/spec/fixtures/blog/app/content_types/comments.yml +20 -0
  56. data/spec/fixtures/blog/app/content_types/posts.yml +19 -0
  57. data/spec/fixtures/blog/app/views/pages/404.liquid +11 -0
  58. data/spec/fixtures/blog/app/views/pages/about-us.liquid.haml +29 -0
  59. data/spec/fixtures/blog/app/views/pages/index.liquid +25 -0
  60. data/spec/fixtures/blog/app/views/pages/posts/content_type_template.fr.liquid +14 -0
  61. data/spec/fixtures/blog/app/views/pages/posts/content_type_template.liquid +15 -0
  62. data/spec/fixtures/blog/app/views/pages/posts.fr.liquid +13 -0
  63. data/spec/fixtures/blog/app/views/pages/posts.liquid +13 -0
  64. data/spec/fixtures/blog/config/deploy.yml +4 -0
  65. data/spec/fixtures/blog/config/site.yml +16 -0
  66. data/spec/fixtures/blog/data/comments.yml +16 -0
  67. data/spec/fixtures/blog/data/posts.yml +7 -0
  68. data/spec/integration/generators/page_spec.rb +87 -0
  69. data/spec/integration/generators/relationship_spec.rb +102 -0
  70. data/spec/support/helpers.rb +19 -1
  71. metadata +38 -6
  72. data/generators/foundation5/public/stylesheets/foundation/components/_reveal-new.scss +0 -0
  73. data/generators/foundation5/public/stylesheets/foundation/components/_switch.scss +0 -294
@@ -10,8 +10,8 @@
10
10
  $include-html-button-classes: $include-html-classes !default;
11
11
 
12
12
  // We use these to set the color of the pip in dropdown buttons
13
- $dropdown-button-pip-color: #fff !default;
14
- $dropdown-button-pip-color-alt: #333 !default;
13
+ $dropdown-button-pip-color: $white !default;
14
+ $dropdown-button-pip-color-alt: $oil !default;
15
15
 
16
16
  $button-pip-tny: rem-calc(6) !default;
17
17
  $button-pip-sml: rem-calc(7) !default;
@@ -49,17 +49,18 @@ $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3) !default;
49
49
  // We use this mixin to build off of the button mixin and add dropdown button styles
50
50
  //
51
51
  // $padding - Determines the size of button you're working with. Default: medium. Options [tiny, small, medium, large]
52
- // $pip-color - Color of the little triangle that points to the dropdown. Default: #fff.
52
+ // $pip-color - Color of the little triangle that points to the dropdown. Default: $white.
53
53
  // $base-style - Add in base-styles. This can be set to false. Default:true
54
54
 
55
- @mixin dropdown-button($padding:medium, $pip-color:#fff, $base-style:true) {
55
+ @mixin dropdown-button($padding:medium, $pip-color:$white, $base-style:true) {
56
56
 
57
57
  // We add in base styles, but they can be negated by setting to 'false'.
58
58
  @if $base-style {
59
59
  position: relative;
60
+ outline: none;
60
61
 
61
62
  // This creates the base styles for the triangle pip
62
- &:after {
63
+ &::after {
63
64
  position: absolute;
64
65
  content: "";
65
66
  width: 0;
@@ -74,7 +75,7 @@ $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3) !default;
74
75
  // If we're dealing with tiny buttons, use these styles
75
76
  @if $padding == tiny {
76
77
  padding-#{$opposite-direction}: $dropdown-button-padding-tny;
77
- &:before {
78
+ &:after {
78
79
  border-width: $dropdown-button-pip-size-tny;
79
80
  #{$opposite-direction}: $dropdown-button-pip-opposite-tny;
80
81
  margin-top: $dropdown-button-pip-top-tny;
@@ -84,7 +85,7 @@ $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3) !default;
84
85
  // If we're dealing with small buttons, use these styles
85
86
  @if $padding == small {
86
87
  padding-#{$opposite-direction}: $dropdown-button-padding-sml;
87
- &:after {
88
+ &::after {
88
89
  border-width: $dropdown-button-pip-size-sml;
89
90
  #{$opposite-direction}: $dropdown-button-pip-opposite-sml;
90
91
  margin-top: $dropdown-button-pip-top-sml;
@@ -94,7 +95,7 @@ $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3) !default;
94
95
  // If we're dealing with default (medium) buttons, use these styles
95
96
  @if $padding == medium {
96
97
  padding-#{$opposite-direction}: $dropdown-button-padding-med;
97
- &:after {
98
+ &::after {
98
99
  border-width: $dropdown-button-pip-size-med;
99
100
  #{$opposite-direction}: $dropdown-button-pip-opposite-med;
100
101
  margin-top: $dropdown-button-pip-top-med;
@@ -104,7 +105,7 @@ $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3) !default;
104
105
  // If we're dealing with large buttons, use these styles
105
106
  @if $padding == large {
106
107
  padding-#{$opposite-direction}: $dropdown-button-padding-lrg;
107
- &:after {
108
+ &::after {
108
109
  border-width: $dropdown-button-pip-size-lrg;
109
110
  #{$opposite-direction}: $dropdown-button-pip-opposite-lrg;
110
111
  margin-top: $dropdown-button-pip-top-lrg;
@@ -113,7 +114,7 @@ $dropdown-button-pip-top-lrg: -$button-pip-lrg / 2 + rem-calc(3) !default;
113
114
 
114
115
  // We can control the pip color. We didn't use logic in this case, just set it and forget it.
115
116
  @if $pip-color {
116
- &:after { border-color: $pip-color transparent transparent transparent; }
117
+ &::after { border-color: $pip-color transparent transparent transparent; }
117
118
  }
118
119
  }
119
120
 
@@ -27,30 +27,33 @@ $f-dropdown-margin-right: $f-dropdown-margin-top !default;
27
27
  $f-dropdown-margin-bottom: $f-dropdown-margin-top !default;
28
28
 
29
29
  // We use this to control the background color
30
- $f-dropdown-bg: #fff !default;
30
+ $f-dropdown-bg: $white !default;
31
31
 
32
32
  // We use this to set the border styles for dropdowns.
33
33
  $f-dropdown-border-style: solid !default;
34
34
  $f-dropdown-border-width: 1px !default;
35
- $f-dropdown-border-color: scale-color(#fff, $lightness: -20%) !default;
35
+ $f-dropdown-border-color: scale-color($white, $lightness: -20%) !default;
36
36
 
37
37
  // We use these to style the triangle pip.
38
38
  $f-dropdown-triangle-size: 6px !default;
39
- $f-dropdown-triangle-color: #fff !default;
39
+ $f-dropdown-triangle-color: $white !default;
40
40
  $f-dropdown-triangle-side-offset: 10px !default;
41
41
 
42
42
  // We use these to control styles for the list elements.
43
43
  $f-dropdown-list-style: none !default;
44
- $f-dropdown-font-color: #555 !default;
44
+ $f-dropdown-font-color: $charcoal !default;
45
45
  $f-dropdown-font-size: rem-calc(14) !default;
46
46
  $f-dropdown-list-padding: rem-calc(5, 10) !default;
47
47
  $f-dropdown-line-height: rem-calc(18) !default;
48
- $f-dropdown-list-hover-bg: #eeeeee !default;
48
+ $f-dropdown-list-hover-bg: $smoke !default;
49
49
  $dropdown-mobile-default-float: 0 !default;
50
50
 
51
51
  // We use this to control the styles for when the dropdown has custom content.
52
52
  $f-dropdown-content-padding: rem-calc(20) !default;
53
53
 
54
+ // Default radius for dropdown.
55
+ $f-dropdown-radius: $global-radius !default;
56
+
54
57
  //
55
58
  // @mixins
56
59
  //
@@ -65,6 +68,7 @@ $f-dropdown-content-padding: rem-calc(20) !default;
65
68
  left: -9999px;
66
69
  list-style: $f-dropdown-list-style;
67
70
  margin-#{$default-float}: 0;
71
+ outline: none;
68
72
 
69
73
  > *:first-child { margin-top: 0; }
70
74
  > *:last-child { margin-bottom: 0; }
@@ -76,7 +80,7 @@ $f-dropdown-content-padding: rem-calc(20) !default;
76
80
  background: $f-dropdown-bg;
77
81
  border: $f-dropdown-border-style $f-dropdown-border-width $f-dropdown-border-color;
78
82
  font-size: $f-dropdown-font-size;
79
- z-index: 99;
83
+ z-index: 89;
80
84
  }
81
85
  @else if $content == content {
82
86
  padding: $f-dropdown-content-padding;
@@ -86,7 +90,7 @@ $f-dropdown-content-padding: rem-calc(20) !default;
86
90
  background: $f-dropdown-bg;
87
91
  border: $f-dropdown-border-style $f-dropdown-border-width $f-dropdown-border-color;
88
92
  font-size: $f-dropdown-font-size;
89
- z-index: 99;
93
+ z-index: 89;
90
94
  }
91
95
 
92
96
  @if $triangle == bottom {
@@ -97,66 +101,66 @@ $f-dropdown-content-padding: rem-calc(20) !default;
97
101
  position: absolute;
98
102
  top: -($f-dropdown-triangle-size * 2);
99
103
  #{$default-float}: $f-dropdown-triangle-side-offset;
100
- z-index: 99;
104
+ z-index: 89;
101
105
  }
102
106
  &:after {
103
107
  @include css-triangle($f-dropdown-triangle-size + 1, $f-dropdown-border-color, bottom);
104
108
  position: absolute;
105
109
  top: -(($f-dropdown-triangle-size + 1) * 2);
106
110
  #{$default-float}: $f-dropdown-triangle-side-offset - 1;
107
- z-index: 98;
111
+ z-index: 88;
108
112
  }
109
113
 
110
114
  &.right:before {
111
- left: auto;
112
- right: $f-dropdown-triangle-side-offset;
115
+ #{$default-float}: auto;
116
+ #{$opposite-direction}: $f-dropdown-triangle-side-offset;
113
117
  }
114
118
  &.right:after {
115
- left: auto;
116
- right: $f-dropdown-triangle-side-offset - 1;
119
+ #{$default-float}: auto;
120
+ #{$opposite-direction}: $f-dropdown-triangle-side-offset - 1;
117
121
  }
118
122
  }
119
123
 
120
- @if $triangle == left {
124
+ @if $triangle == $default-float {
121
125
  margin-top: 0;
122
- margin-left: $f-dropdown-margin-right;
126
+ margin-#{$default-float}: $f-dropdown-margin-right;
123
127
 
124
128
  &:before {
125
- @include css-triangle($f-dropdown-triangle-size, $f-dropdown-triangle-color, right);
129
+ @include css-triangle($f-dropdown-triangle-size, $f-dropdown-triangle-color, #{$opposite-direction});
126
130
  position: absolute;
127
131
  top: $f-dropdown-triangle-side-offset;
128
132
  #{$default-float}: -($f-dropdown-triangle-size * 2);
129
- z-index: 99;
133
+ z-index: 89;
130
134
  }
131
135
  &:after {
132
- @include css-triangle($f-dropdown-triangle-size + 1, $f-dropdown-border-color, right);
136
+ @include css-triangle($f-dropdown-triangle-size + 1, $f-dropdown-border-color, #{$opposite-direction});
133
137
  position: absolute;
134
138
  top: $f-dropdown-triangle-side-offset - 1;
135
139
  #{$default-float}: -($f-dropdown-triangle-size * 2) - 2;
136
- z-index: 98;
140
+ z-index: 88;
137
141
  }
138
142
 
139
143
  }
140
144
 
141
- @if $triangle == right {
145
+ @if $triangle == $opposite-direction {
142
146
  margin-top: 0;
143
- margin-left: -$f-dropdown-margin-right;
147
+ margin-#{$default-float}: -$f-dropdown-margin-right;
144
148
 
145
149
  &:before {
146
- @include css-triangle($f-dropdown-triangle-size, $f-dropdown-triangle-color, left);
150
+ @include css-triangle($f-dropdown-triangle-size, $f-dropdown-triangle-color, #{$default-float});
147
151
  position: absolute;
148
152
  top: $f-dropdown-triangle-side-offset;
149
153
  #{$opposite-direction}: -($f-dropdown-triangle-size * 2);
150
- left: auto;
151
- z-index: 99;
154
+ #{$default-float}: auto;
155
+ z-index: 89;
152
156
  }
153
157
  &:after {
154
- @include css-triangle($f-dropdown-triangle-size + 1, $f-dropdown-border-color, left);
158
+ @include css-triangle($f-dropdown-triangle-size + 1, $f-dropdown-border-color, #{$default-float});
155
159
  position: absolute;
156
160
  top: $f-dropdown-triangle-side-offset - 1;
157
161
  #{$opposite-direction}: -($f-dropdown-triangle-size * 2) - 2;
158
- left: auto;
159
- z-index: 98;
162
+ #{$default-float}: auto;
163
+ z-index: 88;
160
164
  }
161
165
 
162
166
  }
@@ -171,8 +175,8 @@ $f-dropdown-content-padding: rem-calc(20) !default;
171
175
  top: auto;
172
176
  bottom: -($f-dropdown-triangle-size * 2);
173
177
  #{$default-float}: $f-dropdown-triangle-side-offset;
174
- right: auto;
175
- z-index: 99;
178
+ #{$opposite-direction}: auto;
179
+ z-index: 89;
176
180
  }
177
181
  &:after {
178
182
  @include css-triangle($f-dropdown-triangle-size + 1, $f-dropdown-border-color, top);
@@ -180,8 +184,8 @@ $f-dropdown-content-padding: rem-calc(20) !default;
180
184
  top: auto;
181
185
  bottom: -($f-dropdown-triangle-size * 2) - 2;
182
186
  #{$default-float}: $f-dropdown-triangle-side-offset - 1;
183
- right: auto;
184
- z-index: 98;
187
+ #{$opposite-direction}: auto;
188
+ z-index: 88;
185
189
  }
186
190
 
187
191
  }
@@ -205,6 +209,8 @@ $f-dropdown-content-padding: rem-calc(20) !default;
205
209
  &:hover,
206
210
  &:focus { background: $f-dropdown-list-hover-bg; }
207
211
 
212
+ &.radius { @include radius($f-dropdown-radius); }
213
+
208
214
  a {
209
215
  display: block;
210
216
  padding: $f-dropdown-list-padding;
@@ -219,12 +225,12 @@ $f-dropdown-content-padding: rem-calc(20) !default;
219
225
  .f-dropdown {
220
226
  @include dropdown-container(list, bottom);
221
227
 
222
- &.drop-right {
223
- @include dropdown-container(list, left);
228
+ &.drop-#{$opposite-direction} {
229
+ @include dropdown-container(list, #{$default-float});
224
230
  }
225
231
 
226
- &.drop-left {
227
- @include dropdown-container(list, right);
232
+ &.drop-#{$default-float} {
233
+ @include dropdown-container(list, #{$opposite-direction});
228
234
  }
229
235
 
230
236
  &.drop-top {
@@ -242,6 +248,14 @@ $f-dropdown-content-padding: rem-calc(20) !default;
242
248
  &.small { max-width: 300px; }
243
249
  &.medium { max-width: 500px; }
244
250
  &.large { max-width: 800px; }
251
+ &.mega {
252
+ width:100%!important;
253
+ max-width:100%!important;
254
+
255
+ &.open{
256
+ left:0!important;
257
+ }
258
+ }
245
259
  }
246
260
 
247
261
  }
@@ -18,43 +18,47 @@ $form-label-pointer: pointer !default;
18
18
  $form-label-font-size: rem-calc(14) !default;
19
19
  $form-label-font-weight: $font-weight-normal !default;
20
20
  $form-label-line-height: 1.5 !default;
21
- $form-label-font-color: scale-color(#000, $lightness: 30%) !default;
21
+ $form-label-font-color: scale-color($black, $lightness: 30%) !default;
22
22
  $form-label-small-transform: capitalize !default;
23
23
  $form-label-bottom-margin: 0 !default;
24
24
  $input-font-family: inherit !default;
25
25
  $input-font-color: rgba(0,0,0,0.75) !default;
26
26
  $input-font-size: rem-calc(14) !default;
27
- $input-bg-color: #fff !default;
28
- $input-focus-bg-color: scale-color(#fff, $lightness: -2%) !default;
29
- $input-border-color: scale-color(#fff, $lightness: -20%) !default;
30
- $input-focus-border-color: scale-color(#fff, $lightness: -40%) !default;
27
+ $input-bg-color: $white !default;
28
+ $input-focus-bg-color: scale-color($white, $lightness: -2%) !default;
29
+ $input-border-color: scale-color($white, $lightness: -20%) !default;
30
+ $input-focus-border-color: scale-color($white, $lightness: -40%) !default;
31
31
  $input-border-style: solid !default;
32
32
  $input-border-width: 1px !default;
33
33
  $input-border-radius: $global-radius !default;
34
- $input-disabled-bg: #ddd !default;
34
+ $input-disabled-bg: $gainsboro !default;
35
+ $input-disabled-cursor: $cursor-default-value !default;
35
36
  $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1) !default;
36
37
  $input-include-glowing-effect: true !default;
37
38
 
38
39
  // We use these to style the fieldset border and spacing.
39
40
  $fieldset-border-style: solid !default;
40
41
  $fieldset-border-width: 1px !default;
41
- $fieldset-border-color: #ddd !default;
42
+ $fieldset-border-color: $gainsboro !default;
42
43
  $fieldset-padding: rem-calc(20) !default;
43
44
  $fieldset-margin: rem-calc(18 0) !default;
44
45
 
45
46
  // We use these to style the legends when you use them
46
- $legend-bg: #fff !default;
47
+ $legend-bg: $white !default;
47
48
  $legend-font-weight: $font-weight-bold !default;
48
49
  $legend-padding: rem-calc(0 3) !default;
49
50
 
50
51
  // We use these to style the prefix and postfix input elements
51
- $input-prefix-bg: scale-color(#fff, $lightness: -5%) !default;
52
- $input-prefix-border-color: scale-color(#fff, $lightness: -20%) !default;
52
+ $input-prefix-bg: scale-color($white, $lightness: -5%) !default;
53
+ $input-prefix-border-color: scale-color($white, $lightness: -20%) !default;
53
54
  $input-prefix-border-size: 1px !default;
54
55
  $input-prefix-border-type: solid !default;
55
56
  $input-prefix-overflow: hidden !default;
56
- $input-prefix-font-color: #333 !default;
57
- $input-prefix-font-color-alt: #fff !default;
57
+ $input-prefix-font-color: $oil !default;
58
+ $input-prefix-font-color-alt: $white !default;
59
+
60
+ // We use this setting to turn on/off HTML5 number spinners (the up/down arrows)
61
+ $input-number-spinners: true !default;
58
62
 
59
63
  // We use these to style the error states for inputs and labels
60
64
  $input-error-message-padding: rem-calc(6 9 9) !default;
@@ -62,15 +66,15 @@ $input-error-message-top: -1px !default;
62
66
  $input-error-message-font-size: rem-calc(12) !default;
63
67
  $input-error-message-font-weight: $font-weight-normal !default;
64
68
  $input-error-message-font-style: italic !default;
65
- $input-error-message-font-color: #fff !default;
66
- $input-error-message-font-color-alt: #333 !default;
69
+ $input-error-message-font-color: $white !default;
70
+ $input-error-message-font-color-alt: $oil !default;
67
71
 
68
72
  // We use this to style the glowing effect of inputs when focused
69
73
  $glowing-effect-fade-time: 0.45s !default;
70
74
  $glowing-effect-color: $input-focus-border-color !default;
71
75
 
72
76
  // Select variables
73
- $select-bg-color: #fafafa !default;
77
+ $select-bg-color: $ghost !default;
74
78
  $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
75
79
 
76
80
  //
@@ -107,7 +111,11 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
107
111
  @mixin form-element {
108
112
  background-color: $input-bg-color;
109
113
  font-family: $input-font-family;
110
- border: $input-border-width $input-border-style $input-border-color;
114
+ border: {
115
+ style: $input-border-style;
116
+ width: $input-border-width;
117
+ color: $input-border-color;
118
+ }
111
119
  box-shadow: $input-box-shadow;
112
120
  color: $input-font-color;
113
121
  display: block;
@@ -126,9 +134,19 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
126
134
  border-color: $input-focus-border-color;
127
135
  outline: none;
128
136
  }
137
+ // Disbaled Styles
138
+ &:disabled {
139
+ background-color: $input-disabled-bg;
140
+ cursor: $input-disabled-cursor;
141
+ }
129
142
 
130
143
  // Disabled background input background color
131
- &[disabled], fieldset[disabled] & { background-color: $input-disabled-bg; }
144
+ &[disabled],
145
+ &[readonly],
146
+ fieldset[disabled] & {
147
+ background-color: $input-disabled-bg;
148
+ cursor: $input-disabled-cursor;
149
+ }
132
150
  }
133
151
 
134
152
  // @MIXIN
@@ -181,7 +199,7 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
181
199
  // @MIXIN
182
200
  //
183
201
  // We use this mixin to create prefix label styles
184
- // $bg - Default:$input-prefix-bg || scale-color(#fff, $lightness: -5%) !default;
202
+ // $bg - Default:$input-prefix-bg || scale-color($white, $lightness: -5%) !default;
185
203
  // $is-button - Toggle position settings if prefix is a button. Default:false
186
204
  //
187
205
  @mixin prefix($bg:$input-prefix-bg, $border:$input-prefix-border-color, $is-button:false) {
@@ -215,7 +233,7 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
215
233
  // @MIXIN
216
234
  //
217
235
  // We use this mixin to create postfix label styles
218
- // $bg - Default:$input-prefix-bg || scale-color(#fff, $lightness: -5%) !default;
236
+ // $bg - Default:$input-prefix-bg || scale-color($white, $lightness: -5%) !default;
219
237
  // $is-button - Toggle position settings if prefix is a button. Default: false
220
238
  @mixin postfix($bg:$input-prefix-bg, $border:$input-prefix-border-color, $is-button:false) {
221
239
 
@@ -305,13 +323,30 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
305
323
  // We use this mixin to style select elements
306
324
  @mixin form-select {
307
325
  -webkit-appearance: none !important;
326
+ -webkit-border-radius: 0px;
308
327
  background-color: $select-bg-color;
309
- background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iM3B4IiB2aWV3Qm94PSIwIDAgNiAzIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2IDMiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwb2x5Z29uIHBvaW50cz0iNS45OTIsMCAyLjk5MiwzIC0wLjAwOCwwICIvPjwvc3ZnPg==');
328
+
329
+ // Hide the dropdown arrow shown in newer IE versions
330
+ &::-ms-expand {
331
+ display: none;
332
+ }
333
+
334
+ // The custom arrow have some fake horizontal padding so we can align it
335
+ // from the right side of the element without relying on CSS3
336
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);
337
+
338
+ // We can safely use leftmost and rightmost now
339
+ background-position: if($text-direction == 'rtl', 0%, 100%) center;
340
+
310
341
  background-repeat: no-repeat;
311
- background-position: if($text-direction == 'rtl', 3%, 97%) center;
312
- border: $input-border-width $input-border-style $input-border-color;
342
+ border: {
343
+ style: $input-border-style;
344
+ width: $input-border-width;
345
+ color: $input-border-color;
346
+ }
313
347
  padding: $form-spacing / 2;
314
348
  font-size: $input-font-size;
349
+ font-family: $body-font-family;
315
350
  color: $input-font-color;
316
351
  line-height: normal;
317
352
  @include radius(0);
@@ -320,6 +355,23 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
320
355
  background-color: $select-hover-bg-color;
321
356
  border-color: $input-focus-border-color;
322
357
  }
358
+ // Disabled Styles
359
+ &:disabled {
360
+ background-color: $input-disabled-bg;
361
+ cursor: $input-disabled-cursor;
362
+ }
363
+ }
364
+
365
+ // We use this mixin to turn on/off HTML5 number spinners
366
+ @mixin html5number($browser, $on:true) {
367
+ @if $on==false {
368
+ @if $browser==webkit {
369
+ -webkit-appearance: none;
370
+ margin: 0;
371
+ } @else if $browser==moz {
372
+ -moz-appearance: textfield;
373
+ }
374
+ }
323
375
  }
324
376
 
325
377
  @include exports("form") {
@@ -341,14 +393,6 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
341
393
  }
342
394
  }
343
395
 
344
- select::-ms-expand {
345
- display:none;
346
- }
347
-
348
- @-moz-document url-prefix() {
349
- select { background: $select-bg-color; }
350
- select:hover { background: $select-hover-bg-color }
351
- }
352
396
  /* Attach elements to the beginning or end of an input */
353
397
  .prefix,
354
398
  .postfix { @include prefix-postfix-base; }
@@ -363,12 +407,8 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
363
407
  .postfix.button.round { @include radius(0); @include side-radius($opposite-direction, $button-round); }
364
408
 
365
409
  /* Separate prefix and postfix styles when on span or label so buttons keep their own */
366
- span.prefix,label.prefix { @include prefix();
367
- &.radius { @include radius(0); @include side-radius($default-float, $global-radius); }
368
- }
369
- span.postfix,label.postfix { @include postfix();
370
- &.radius { @include radius(0); @include side-radius($opposite-direction, $global-radius); }
371
- }
410
+ span.prefix,label.prefix { @include prefix(); }
411
+ span.postfix,label.postfix { @include postfix(); }
372
412
 
373
413
  /* We use this to get basic styling on all basic form elements */
374
414
  input[type="text"],
@@ -384,8 +424,10 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
384
424
  input[type="tel"],
385
425
  input[type="time"],
386
426
  input[type="url"],
427
+ input[type="color"],
387
428
  textarea {
388
429
  -webkit-appearance: none;
430
+ -webkit-border-radius: 0px;
389
431
  @include form-element;
390
432
  @if $input-include-glowing-effect == false {
391
433
  @include single-transition(all, 0.15s, linear);
@@ -395,8 +437,38 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
395
437
  }
396
438
  }
397
439
 
440
+ form {
441
+ .row {
442
+ .prefix-radius.row.collapse {
443
+ input,
444
+ textarea,
445
+ select { @include radius(0); @include side-radius($opposite-direction, $button-radius); }
446
+ .prefix { @include radius(0); @include side-radius($default-float, $button-radius); }
447
+ }
448
+ .postfix-radius.row.collapse {
449
+ input,
450
+ textarea,
451
+ select { @include radius(0); @include side-radius($default-float, $button-radius); }
452
+ .postfix { @include radius(0); @include side-radius($opposite-direction, $button-radius); }
453
+ }
454
+ .prefix-round.row.collapse {
455
+ input,
456
+ textarea,
457
+ select { @include radius(0); @include side-radius($opposite-direction, $button-round); }
458
+ .prefix { @include radius(0); @include side-radius($default-float, $button-round); }
459
+ }
460
+ .postfix-round.row.collapse {
461
+ input,
462
+ textarea,
463
+ select { @include radius(0); @include side-radius($default-float, $button-round); }
464
+ .postfix { @include radius(0); @include side-radius($opposite-direction, $button-round); }
465
+ }
466
+ }
467
+ }
468
+
398
469
  input[type="submit"] {
399
470
  -webkit-appearance: none;
471
+ -webkit-border-radius: 0px;
400
472
  }
401
473
 
402
474
  /* Respect enforced amount of rows for textarea */
@@ -404,6 +476,11 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
404
476
  height: auto;
405
477
  }
406
478
 
479
+ /* Not allow resize out of parent */
480
+ textarea {
481
+ max-width: 100%;
482
+ }
483
+
407
484
  /* Add height value for select elements to match text input height */
408
485
  select {
409
486
  @include form-select;
@@ -432,6 +509,15 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
432
509
  width:100%;
433
510
  }
434
511
 
512
+ /* HTML5 Number spinners settings */
513
+ input[type=number] {
514
+ @include html5number(moz, $input-number-spinners)
515
+ }
516
+ input[type="number"]::-webkit-inner-spin-button,
517
+ input[type="number"]::-webkit-outer-spin-button {
518
+ @include html5number(webkit, $input-number-spinners);
519
+ }
520
+
435
521
  /* We add basic fieldset styling */
436
522
  fieldset {
437
523
  @include fieldset;
@@ -440,7 +526,7 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
440
526
  /* Error Handling */
441
527
 
442
528
  #{data('abide')} {
443
- .error small.error, span.error, small.error {
529
+ .error small.error, .error span.error, span.error, small.error {
444
530
  @include form-error-message;
445
531
  }
446
532
  span.error, small.error { display: none; }
@@ -490,7 +576,8 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
490
576
  }
491
577
 
492
578
  input.error,
493
- textarea.error {
579
+ textarea.error,
580
+ select.error {
494
581
  margin-bottom: 0;
495
582
  }
496
583
  label.error { @include form-label-error-color; }