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
@@ -11,21 +11,125 @@
11
11
  $include-html-accordion-classes: $include-html-classes !default;
12
12
 
13
13
  $accordion-navigation-padding: rem-calc(16) !default;
14
- $accordion-navigation-bg-color: #efefef !default;
14
+ $accordion-navigation-bg-color: $silver !default;
15
15
  $accordion-navigation-hover-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -5%) !default;
16
16
  $accordion-navigation-active-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -3%) !default;
17
- $accordion-navigation-font-color: #222 !default;
17
+ $accordion-navigation-font-color: $jet !default;
18
18
  $accordion-navigation-font-size: rem-calc(16) !default;
19
19
  $accordion-navigation-font-family: $body-font-family !default;
20
20
 
21
21
  $accordion-content-padding: $column-gutter/2 !default;
22
- $accordion-content-active-bg-color: #fff !default;
22
+ $accordion-content-active-bg-color: $white !default;
23
+
24
+
25
+ // Mixin: accordion-container()
26
+ // Decription: Responsible for the container component of accordions, generating styles relating to a margin of zero and a clearfix
27
+ // Explicit Dependencies: a clearfix mixin *is* defined.
28
+ // Implicit Dependencies: None
29
+
30
+ @mixin accordion-container() {
31
+ @include clearfix;
32
+ margin-bottom: 0;
33
+ }
34
+
35
+ // Mixin: accordion-navigation( $bg, $hover-bg, $active-bg, $padding, $active_class, $font-color, $font-size, $font-family){
36
+ // @params $bg-color: [ color or string ]: Specify the background color for the navigation element
37
+ // @params $hover-bg-color [ color or string ]: Specify the background color for the navigation element when hovered
38
+ // @params $active-bg [ color or string ]: Specify the background color for the navigation element when clicked and not released.
39
+ // @params $active_class [ string ]: Specify the class name used to keep track of which accordion tab should be visible
40
+ // @params $font-color [ color or string ]: Color of the font for accordion
41
+ // @params $font-size [ number ]: Specifiy the font-size of the text inside the navigation element
42
+ // @params $font-family [ string ]: Specify the font family for the text of the navigation of the accorion
43
+
44
+ @mixin accordion-navigation( $bg: $accordion-navigation-bg-color, $hover-bg: $accordion-navigation-hover-bg-color, $active-bg: $accordion-navigation-active-bg-color, $padding: $accordion-navigation-padding, $active_class: 'active', $font-color: $accordion-navigation-font-color, $font-size: $accordion-navigation-font-size, $font-family: $accordion-navigation-font-family ){
45
+ display: block;
46
+ margin-bottom: 0 !important;
47
+ @if type-of($active_class) != "string" {
48
+ @warn "`#{$active_class}` isn't a valid string. A valid string is needed to correctly be interpolated as a CSS class. CSS classes cannot start with a number or consist of only numbers. CSS will not be generated for the active state of this navigation component."
49
+ }
50
+ @else {
51
+ &.#{ $active_class } > a {
52
+ background: $active-bg;
53
+ }
54
+ }
55
+ > a {
56
+ background: $bg;
57
+ color: $font-color;
58
+ @if type-of($padding) != number {
59
+ @warn "`#{$padding}` was read as #{type-of($padding)}";
60
+ @if $accordion-navigation-padding != null {
61
+ @warn "#{$padding} was read as a #{type-of($padding)}";
62
+ @warn "`#{$padding}` isn't a valid number. $accordion-navigation-padding (#{$accordion-navigation-padding}) will be used instead.)";
63
+ padding: $accordion-navigation-padding;
64
+ }
65
+ @else {
66
+ @warn "`#{$padding}` isn't a valid number and $accordion-navigation-padding is missing. A value of `null` is returned to not output an invalid value for padding";
67
+ padding: null;
68
+ }
69
+ }
70
+ @else {
71
+ padding: $padding;
72
+ }
73
+ display: block;
74
+ font-family: $font-family;
75
+ @if type-of($font-size) != number {
76
+ @warn "`#{$font-size}` was read as a #{type-of($font-size)}";
77
+ @if $accordion-navigation-font-size != null {
78
+ @warn "`#{$font-size}` is not a valid number. The value of $accordion-navigation-font-size will be used instead (#{$accordion-navigation-font-size}).";
79
+ font-size: $accordion-navigation-font-size;
80
+ }
81
+ @else{
82
+ @warn "`#{$font-size}` is not a valid number and the default value of $accordion-navigation-font-size is not defined. A value of `null` will be returned to not generate an invalid value for font-size.";
83
+ font-size: null;
84
+
85
+ }
86
+ }
87
+ @else {
88
+ font-size: $font-size;
89
+ }
90
+ &:hover {
91
+ background: $hover-bg;
92
+ }
93
+ }
94
+ }
95
+
96
+ // Mixin: accordion-content($bg, $padding, $active-class)
97
+ // @params $padding [ number ]: Padding for the content of the container
98
+ // @params $bg [ color ]: Background color for the content when it's visible
99
+ // @params $active_class [ string ]: Class name used to keep track of which accordion tab should be visible.
100
+
101
+ @mixin accordion-content($bg: $accordion-content-active-bg-color, $padding: $accordion-content-padding, $active_class: 'active'){
102
+ display: none;
103
+ @if type-of($padding) != "number" {
104
+ @warn "#{$padding} was read as a #{type-of($padding)}";
105
+ @if $accordion-content-padding != null {
106
+ @warn "`#{$padding}` isn't a valid number. $accordion-content-padding used instead";
107
+ padding: $accordion-content-padding;
108
+ } @else {
109
+ @warn "`#{$padding}` isn't a valid number and the default value of $accordion-content-padding is not defined. A value of `null` is returned to not output an invalid value for padding.";
110
+ padding: null;
111
+ }
112
+ } @else {
113
+ padding: $padding;
114
+ }
115
+
116
+ @if type-of($active_class) != "string" {
117
+ @warn "`#{$active_class}` isn't a valid string. A valid string is needed to correctly be interpolated as a CSS class. CSS classes cannot start with a number or consist of only numbers. CSS will not be generated for the active state of the content. "
118
+ }
119
+ @else {
120
+ &.#{$active_class} {
121
+ display: block;
122
+ background: $bg;
123
+ }
124
+ }
125
+ }
23
126
 
24
127
  @include exports("accordion") {
25
128
  @if $include-html-accordion-classes {
26
129
  .accordion {
27
- @include clearfix; margin-bottom: 0;
28
- dd {
130
+ @include clearfix;
131
+ margin-bottom: 0;
132
+ .accordion-navigation, dd {
29
133
  display: block;
30
134
  margin-bottom: 0 !important;
31
135
  &.active > a { background: $accordion-navigation-active-bg-color; }
@@ -38,7 +142,7 @@ $accordion-content-active-bg-color: #fff !default;
38
142
  font-size: $accordion-navigation-font-size;
39
143
  &:hover { background: $accordion-navigation-hover-bg-color; }
40
144
  }
41
-
145
+
42
146
  > .content {
43
147
  display: none;
44
148
  padding: $accordion-content-padding;
@@ -18,7 +18,7 @@ $alert-padding-bottom: $alert-padding-top !default;
18
18
  // We use these to control text style.
19
19
  $alert-font-weight: $font-weight-normal !default;
20
20
  $alert-font-size: rem-calc(13) !default;
21
- $alert-font-color: #fff !default;
21
+ $alert-font-color: $white !default;
22
22
  $alert-font-color-alt: scale-color($secondary-color, $lightness: -66%) !default;
23
23
 
24
24
  // We use this for close hover effect.
@@ -31,13 +31,14 @@ $alert-border-color: scale-color($primary-color, $lightness: $alert-function-fac
31
31
  $alert-bottom-margin: rem-calc(20) !default;
32
32
 
33
33
  // We use these to style the close buttons
34
- $alert-close-color: #333 !default;
34
+ $alert-close-color: $oil !default;
35
35
  $alert-close-top: 50% !default;
36
36
  $alert-close-position: rem-calc(4) !default;
37
37
  $alert-close-font-size: rem-calc(22) !default;
38
38
  $alert-close-opacity: 0.3 !default;
39
39
  $alert-close-opacity-hover: 0.5 !default;
40
40
  $alert-close-padding: 9px 6px 4px !default;
41
+ $alert-close-background: inherit !default;
41
42
 
42
43
  // We use this to control border radius
43
44
  $alert-radius: $global-radius !default;
@@ -91,6 +92,7 @@ $alert-transition-ease: ease-out !default;
91
92
  #{$opposite-direction}: $alert-close-position;
92
93
  color: $alert-close-color;
93
94
  opacity: $alert-close-opacity;
95
+ background: $alert-close-background;
94
96
  &:hover,
95
97
  &:focus { opacity: $alert-close-opacity-hover; }
96
98
  }
@@ -7,7 +7,7 @@
7
7
  //
8
8
  // Block Grid Variables
9
9
  //
10
- $include-html-grid-classes: $include-html-classes !default;
10
+ $include-html-block-grid-classes: $include-html-classes !default;
11
11
  $include-xl-html-block-grid-classes: false !default;
12
12
 
13
13
  // We use this to control the maximum number of block grid elements per row
@@ -101,7 +101,7 @@ $block-grid-media-queries: true !default;
101
101
  }
102
102
 
103
103
  @include exports("block-grid") {
104
- @if $include-html-grid-classes {
104
+ @if $include-html-block-grid-classes {
105
105
 
106
106
  [class*="block-grid-"] { @include block-grid; }
107
107
 
@@ -26,13 +26,13 @@ $crumb-radius: $global-radius !default;
26
26
  // We use these to set various text styles for breadcrumbs.
27
27
  $crumb-font-size: rem-calc(11) !default;
28
28
  $crumb-font-color: $primary-color !default;
29
- $crumb-font-color-current: #333 !default;
30
- $crumb-font-color-unavailable: #999 !default;
29
+ $crumb-font-color-current: $oil !default;
30
+ $crumb-font-color-unavailable: $aluminum !default;
31
31
  $crumb-font-transform: uppercase !default;
32
32
  $crumb-link-decor: underline !default;
33
33
 
34
34
  // We use these to control the slash between breadcrumbs
35
- $crumb-slash-color: #aaa !default;
35
+ $crumb-slash-color: $base !default;
36
36
  $crumb-slash: "/" !default;
37
37
 
38
38
  //
@@ -125,3 +125,8 @@ $crumb-slash: "/" !default;
125
125
  }
126
126
  }
127
127
  }
128
+
129
+ /* Accessibility - hides the forward slash */
130
+ [aria-label="breadcrumbs"] [aria-hidden="true"]:after {
131
+ content: "/";
132
+ }
@@ -5,7 +5,6 @@
5
5
  @import "global";
6
6
  @import "buttons";
7
7
 
8
-
9
8
  //
10
9
  // Button Group Variables
11
10
  //
@@ -35,7 +34,7 @@ $button-group-border-width: 1px !default;
35
34
  }
36
35
 
37
36
  // We use this to control styles for button groups
38
- @mixin button-group-style($radius:false, $even:false, $float:$default-float) {
37
+ @mixin button-group-style($radius:false, $even:false, $float:false, $orientation:horizontal) {
39
38
 
40
39
  > button, .button {
41
40
  border-#{$default-float}: $button-group-border-width solid;
@@ -52,30 +51,89 @@ $button-group-border-width: 1px !default;
52
51
  @if $float {
53
52
  margin: 0;
54
53
  float: $float;
54
+ display: list-item;
55
55
  // Make sure the first child doesn't get the negative margin.
56
56
  &:first-child { margin-#{$default-float}: 0; }
57
57
  }
58
+ @else {
59
+ margin: 0 -2px;
60
+ display: inline-block;
61
+ }
62
+
63
+ @if $orientation == vertical {
64
+ display:block;
65
+ margin:0;
66
+ > button, .button {
67
+ border-top: $button-group-border-width solid;
68
+ border-color: rgba(255, 255, 255, 0.5);
69
+ border-left-width: 0px;
70
+ margin:0;
71
+ display: block;
72
+ }
73
+
74
+ &:first-child {
75
+ button, .button {
76
+ border-top: 0;
77
+ }
78
+ }
79
+ }
58
80
 
59
81
  // We use these to control left and right radius on first/last buttons in the group.
60
82
  @if $radius == true {
83
+ &,
84
+ & > a,
85
+ & > button,
86
+ & > .button { @include radius(0); }
61
87
  &:first-child,
62
88
  &:first-child > a,
63
89
  &:first-child > button,
64
- &:first-child > .button { @include side-radius($default-float, $button-radius); }
90
+ &:first-child > .button {
91
+ @if $orientation == vertical {
92
+ @include side-radius(top, $button-radius);
93
+ }
94
+ @else {
95
+ @include side-radius($default-float, $button-radius);
96
+ }
97
+ }
65
98
  &:last-child,
66
99
  &:last-child > a,
67
100
  &:last-child > button,
68
- &:last-child > .button { @include side-radius($opposite-direction, $button-radius); }
101
+ &:last-child > .button {
102
+ @if $orientation == vertical {
103
+ @include side-radius(bottom, $button-radius);
104
+ }
105
+ @else {
106
+ @include side-radius($opposite-direction, $button-radius);
107
+ }
108
+ }
69
109
  }
70
110
  @else if $radius {
111
+ &,
112
+ & > a,
113
+ & > button,
114
+ & > .button { @include radius(0); }
71
115
  &:first-child,
72
116
  &:first-child > a,
73
117
  &:first-child > button,
74
- &:first-child > .button { @include side-radius($default-float, $radius); }
118
+ &:first-child > .button {
119
+ @if $orientation == vertical {
120
+ @include side-radius(top, $radius);
121
+ }
122
+ @else {
123
+ @include side-radius($default-float, $radius);
124
+ }
125
+ }
75
126
  &:last-child,
76
127
  &:last-child > a,
77
128
  &:last-child > button,
78
- &:last-child > .button { @include side-radius($opposite-direction, $radius); }
129
+ &:last-child > .button {
130
+ @if $orientation == vertical {
131
+ @include side-radius(bottom, $radius);
132
+ }
133
+ @else {
134
+ @include side-radius($opposite-direction, $radius);
135
+ }
136
+ }
79
137
  }
80
138
 
81
139
  // We use this to make the buttons even width across their container
@@ -83,7 +141,6 @@ $button-group-border-width: 1px !default;
83
141
  width: percentage((100/$even) / 100);
84
142
  button, .button { width: 100%; }
85
143
  }
86
-
87
144
  }
88
145
 
89
146
  @include exports("button-group") {
@@ -92,8 +149,40 @@ $button-group-border-width: 1px !default;
92
149
 
93
150
  & > li { @include button-group-style(); }
94
151
 
152
+ &.stack {
153
+ & > li { @include button-group-style($orientation:vertical); float: none; }
154
+ }
155
+
156
+ &.stack-for-small {
157
+ & > li {
158
+ @include button-group-style($orientation:horizontal);
159
+ @media #{$small-only} {
160
+ @include button-group-style($orientation:vertical);
161
+ }
162
+ }
163
+ }
164
+
95
165
  &.radius > * { @include button-group-style($radius:$button-radius, $float:null); }
166
+ &.radius.stack > * { @include button-group-style($radius:$button-radius, $float:null, $orientation:vertical); }
167
+ &.radius.stack-for-small > * {
168
+ @media #{$medium-up} {
169
+ @include button-group-style($radius:$button-radius, $orientation:horizontal);
170
+ }
171
+ @media #{$small-only} {
172
+ @include button-group-style($radius:$button-radius, $orientation:vertical);
173
+ }
174
+ }
175
+
96
176
  &.round > * { @include button-group-style($radius:$button-round, $float:null); }
177
+ &.round.stack > * { @include button-group-style($radius:$button-med, $float:null, $orientation:vertical); }
178
+ &.round.stack-for-small > * {
179
+ @media #{$medium-up} {
180
+ @include button-group-style($radius:$button-round, $orientation:horizontal);
181
+ }
182
+ @media #{$small-only} {
183
+ @include button-group-style($radius:$button-med, $orientation:vertical);
184
+ }
185
+ }
97
186
 
98
187
  @for $i from 2 through 8 {
99
188
  &.even-#{$i} li { @include button-group-style($even:$i, $float:null); }
@@ -102,7 +191,7 @@ $button-group-border-width: 1px !default;
102
191
 
103
192
  .button-bar {
104
193
  @include clearfix;
105
- .button-group { @include button-group-container($styles:false,$float:true); }
194
+ .button-group { @include button-group-container($styles:false, $float:true); }
106
195
  }
107
196
  }
108
- }
197
+ }
@@ -21,8 +21,8 @@ $button-margin-bottom: rem-calc(20) !default;
21
21
 
22
22
  // We use these to control button text styles.
23
23
  $button-font-family: $body-font-family !default;
24
- $button-font-color: #fff !default;
25
- $button-font-color-alt: #333 !default;
24
+ $button-font-color: $white !default;
25
+ $button-font-color-alt: $oil !default;
26
26
  $button-font-tny: rem-calc(11) !default;
27
27
  $button-font-sml: rem-calc(13) !default;
28
28
  $button-font-med: rem-calc(16) !default;
@@ -36,15 +36,27 @@ $button-function-factor: -20% !default;
36
36
  // We use these to control button border styles.
37
37
  $button-border-width: 0px !default;
38
38
  $button-border-style: solid !default;
39
- $button-bg: $primary-color !default;
40
- $button-border-color: scale-color($button-bg, $lightness: $button-function-factor) !default;
39
+ $button-bg-color: $primary-color !default;
40
+ $button-bg-hover: scale-color($button-bg-color, $lightness: $button-function-factor) !default;
41
+ $button-border-color: $button-bg-hover !default;
42
+ $secondary-button-bg-hover: scale-color($secondary-color, $lightness: $button-function-factor) !default;
43
+ $secondary-button-border-color: $secondary-button-bg-hover !default;
44
+ $success-button-bg-hover: scale-color($success-color, $lightness: $button-function-factor) !default;
45
+ $success-button-border-color: $success-button-bg-hover !default;
46
+ $alert-button-bg-hover: scale-color($alert-color, $lightness: $button-function-factor) !default;
47
+ $alert-button-border-color: $alert-button-bg-hover !default;
48
+ $warning-button-bg-hover: scale-color($warning-color, $lightness: $button-function-factor) !default;
49
+ $warning-button-border-color: $warning-button-bg-hover !default;
50
+ $info-button-bg-hover: scale-color($info-color, $lightness: $button-function-factor) !default;
51
+ $info-button-border-color: $info-button-bg-hover !default;
41
52
 
42
53
  // We use this to set the default radius used throughout the core.
43
54
  $button-radius: $global-radius !default;
44
55
  $button-round: $global-rounded !default;
45
56
 
46
- // We use this to set default opacity for disabled buttons.
57
+ // We use this to set default opacity and cursor for disabled buttons.
47
58
  $button-disabled-opacity: 0.7 !default;
59
+ $button-disabled-cursor: $cursor-default-value !default;
48
60
 
49
61
 
50
62
  //
@@ -113,6 +125,10 @@ $button-disabled-opacity: 0.7 !default;
113
125
  }
114
126
  }
115
127
 
128
+ // @MIXIN
129
+ //
130
+ // we use this mixin to create the button hover and border colors
131
+
116
132
  // @MIXIN
117
133
  //
118
134
  // We use this mixin to add button color styles
@@ -120,42 +136,50 @@ $button-disabled-opacity: 0.7 !default;
120
136
  // $bg - Primary color set in settings file. Default: $button-bg.
121
137
  // $radius - If true, set to button radius which is $global-radius || explicitly set radius amount in px (ex. $radius:10px). Default: true
122
138
  // $disabled - We can set $disabled:true to create a disabled transparent button. Default: false
123
- @mixin button-style($bg:$button-bg, $radius:true, $disabled:false) {
139
+ // $bg-hover - Button Hover Background Color. Default: $button-bg-hover
140
+ // $border-color - Button Border Color. Default: $button-border-color
141
+ @mixin button-style($bg:$button-bg-color, $radius:false, $disabled:false, $bg-hover:null, $border-color:null) {
124
142
 
125
143
  // We control which background styles are used,
126
144
  // these can be removed by setting $bg:false
127
145
  @if $bg {
146
+
147
+ @if $bg-hover == null {
148
+ $bg-hover: if($bg == $button-bg-color, $button-bg-hover, scale-color($bg, $lightness: $button-function-factor));
149
+ }
150
+
151
+ @if $border-color == null {
152
+ $border-color: if($bg == $button-bg-color, $button-border-color, scale-color($bg, $lightness: $button-function-factor));
153
+ }
154
+
128
155
  // This find the lightness percentage of the background color.
129
156
  $bg-lightness: lightness($bg);
157
+ $bg-hover-lightness: lightness($bg-hover);
130
158
 
131
159
  background-color: $bg;
132
- border-color: scale-color($bg, $lightness: $button-function-factor);
160
+ border-color: $border-color;
133
161
  &:hover,
134
- &:focus { background-color: scale-color($bg, $lightness: $button-function-factor); }
162
+ &:focus { background-color: $bg-hover; }
135
163
 
136
164
  // We control the text color for you based on the background color.
137
- @if $bg-lightness > 70% {
138
- color: $button-font-color-alt;
139
- &:hover,
140
- &:focus { color: $button-font-color-alt; }
141
- }
142
- @else {
143
- color: $button-font-color;
144
- &:hover,
145
- &:focus { color: $button-font-color; }
165
+ color: if($bg-lightness > 70%, $button-font-color-alt, $button-font-color);
166
+
167
+ &:hover,
168
+ &:focus {
169
+ color: if($bg-hover-lightness > 70%, $button-font-color-alt, $button-font-color);
146
170
  }
147
171
  }
148
172
 
149
173
  // We can set $disabled:true to create a disabled transparent button.
150
174
  @if $disabled {
151
- cursor: $cursor-default-value;
175
+ cursor: $button-disabled-cursor;
152
176
  opacity: $button-disabled-opacity;
153
177
  box-shadow: none;
154
178
  &:hover,
155
179
  &:focus { background-color: $bg; }
156
180
  }
157
181
 
158
- // We can control how much button radius us used.
182
+ // We can control how much button radius is used.
159
183
  @if $radius == true { @include radius($button-radius); }
160
184
  @else if $radius { @include radius($radius); }
161
185
 
@@ -170,12 +194,18 @@ $button-disabled-opacity: 0.7 !default;
170
194
  // $radius - If true, set to button radius which is $global-radius || explicitly set radius amount in px (ex. $radius:10px). Default:false.
171
195
  // $full-width - We can set $full-width:true to remove side padding extend width. Default:false.
172
196
  // $disabled - We can set $disabled:true to create a disabled transparent button. Default:false.
173
- // $is-input - <input>'s and <button>'s take on strange padding. We added this to help fix that. Default:false.
174
197
  // $is-prefix - Not used? Default:false.
175
- @mixin button($padding:$button-med, $bg:$button-bg, $radius:false, $full-width:false, $disabled:false, $is-prefix:false) {
198
+ // $bg-hover - Button Hover Color - Default null - see button-style mixin
199
+ // $border-color - Button Border Color - Default null - see button-style mixin
200
+ // $transition - We can control whether or not to include the background-color transition property - Default:true.
201
+ @mixin button($padding:$button-med, $bg:$button-bg-color, $radius:false, $full-width:false, $disabled:false, $is-prefix:false, $bg-hover:null, $border-color:null, $transition: true) {
176
202
  @include button-base;
177
203
  @include button-size($padding, $full-width);
178
- @include button-style($bg, $radius, $disabled);
204
+ @include button-style($bg, $radius, $disabled, $bg-hover, $border-color);
205
+
206
+ @if $transition {
207
+ @include single-transition(background-color);
208
+ }
179
209
  }
180
210
 
181
211
 
@@ -190,9 +220,11 @@ $button-disabled-opacity: 0.7 !default;
190
220
 
191
221
  @include single-transition(background-color);
192
222
 
193
- &.secondary { @include button-style($bg:$secondary-color); }
194
- &.success { @include button-style($bg:$success-color); }
195
- &.alert { @include button-style($bg:$alert-color); }
223
+ &.secondary { @include button-style($bg:$secondary-color, $bg-hover:$secondary-button-bg-hover, $border-color:$secondary-button-border-color); }
224
+ &.success { @include button-style($bg:$success-color, $bg-hover:$success-button-bg-hover, $border-color:$success-button-border-color); }
225
+ &.alert { @include button-style($bg:$alert-color, $bg-hover:$alert-button-bg-hover, $border-color:$alert-button-border-color); }
226
+ &.warning { @include button-style($bg:$warning-color, $bg-hover:$warning-button-bg-hover, $border-color:$warning-button-border-color); }
227
+ &.info { @include button-style($bg:$info-color, $bg-hover:$info-button-bg-hover, $border-color:$info-button-border-color); }
196
228
 
197
229
  &.large { @include button-size($padding:$button-lrg); }
198
230
  &.small { @include button-size($padding:$button-sml); }
@@ -205,13 +237,18 @@ $button-disabled-opacity: 0.7 !default;
205
237
  &.radius { @include button-style($bg:false, $radius:true); }
206
238
  &.round { @include button-style($bg:false, $radius:$button-round); }
207
239
 
208
- &.disabled, &[disabled] { @include button-style($bg:$button-bg, $disabled:true);
209
- &.secondary { @include button-style($bg:$secondary-color, $disabled:true); }
210
- &.success { @include button-style($bg:$success-color, $disabled:true); }
211
- &.alert { @include button-style($bg:$alert-color, $disabled:true); }
240
+ &.disabled, &[disabled] { @include button-style($bg:$button-bg-color, $disabled:true, $bg-hover:$button-bg-hover, $border-color:$button-border-color);
241
+ &.secondary { @include button-style($bg:$secondary-color, $disabled:true, $bg-hover:$secondary-button-bg-hover, $border-color:$secondary-button-border-color); }
242
+ &.success { @include button-style($bg:$success-color, $disabled:true, $bg-hover:$success-button-bg-hover, $border-color:$success-button-border-color); }
243
+ &.alert { @include button-style($bg:$alert-color, $disabled:true, $bg-hover:$alert-button-bg-hover, $border-color:$alert-button-border-color); }
244
+ &.warning { @include button-style($bg:$warning-color, $disabled:true, $bg-hover:$warning-button-bg-hover, $border-color:$warning-button-border-color); }
245
+ &.info { @include button-style($bg:$info-color, $disabled:true, $bg-hover:$info-button-bg-hover, $border-color:$info-button-border-color); }
212
246
  }
213
247
  }
214
248
 
249
+ //firefox 2px fix
250
+ button::-moz-focus-inner {border:0; padding:0;}
251
+
215
252
  @media #{$medium-up} {
216
253
  button, .button {
217
254
  @include button-base($style:false, $display:inline-block);
@@ -10,13 +10,13 @@
10
10
  $include-html-clearing-classes: $include-html-classes !default;
11
11
 
12
12
  // We use these to set the background colors for parts of Clearing.
13
- $clearing-bg: #333 !default;
13
+ $clearing-bg: $oil !default;
14
14
  $clearing-caption-bg: $clearing-bg !default;
15
15
  $clearing-carousel-bg: rgba(51,51,51,0.8) !default;
16
16
  $clearing-img-bg: $clearing-bg !default;
17
17
 
18
18
  // We use these to style the close button
19
- $clearing-close-color: #ccc !default;
19
+ $clearing-close-color: $iron !default;
20
20
  $clearing-close-size: 30px !default;
21
21
 
22
22
  // We use these to style the arrows
@@ -24,7 +24,7 @@ $clearing-arrow-size: 12px !default;
24
24
  $clearing-arrow-color: $clearing-close-color !default;
25
25
 
26
26
  // We use these to style captions
27
- $clearing-caption-font-color: #ccc !default;
27
+ $clearing-caption-font-color: $iron !default;
28
28
  $clearing-caption-font-size: 0.875em !default;
29
29
  $clearing-caption-padding: 10px 30px 20px !default;
30
30
 
@@ -81,7 +81,7 @@ $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255) !default;
81
81
  position: absolute;
82
82
  top: 50%;
83
83
  left: 50%;
84
- color: #aaa;
84
+ color: $base;
85
85
  font-size: 0.6em;
86
86
  }
87
87
 
@@ -123,7 +123,7 @@ $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255) !default;
123
123
  display: none;
124
124
 
125
125
  &:hover,
126
- &:focus { color: #ccc; }
126
+ &:focus { color: $iron; }
127
127
  }
128
128
 
129
129
  .clearing-assembled .clearing-container { height: 100%;