@include button-group-expand;
}
- // Default style (according to $button-fill)
- @each $name, $color in $button-palette {
- &.#{$name} #{$buttongroup-child-selector} {
- @include button-fill-style($button-fill, $color, auto, auto);
- }
- }
-
- // Hollow style
- @if $button-fill != hollow {
- &.hollow {
- #{$buttongroup-child-selector} {
- @include button-hollow;
- @include button-hollow-style;
- }
-
- @each $name, $color in $button-palette {
- &.#{$name} #{$buttongroup-child-selector},
- #{$buttongroup-child-selector}.#{$name} {
- @include button-hollow-style($color);
+ // Solid, hollow & clear styles
+ @each $filling in (solid hollow clear) {
+ $base-selector: if($button-fill == $filling, null, '.#{$filling}');
+
+ &#{$base-selector} {
+ // Do not generate button base styles for the default filling
+ @if($button-fill != $filling) {
+ #{$buttongroup-child-selector} {
+ @include button-fill($filling);
+ @include button-fill-style($filling);
}
}
- }
- }
-
- // Clear style
- @if $button-fill != clear {
- &.clear {
- #{$buttongroup-child-selector} {
- @include button-clear;
- @include button-clear-style;
- }
@each $name, $color in $button-palette {
- &.#{$name} #{$buttongroup-child-selector},
- #{$buttongroup-child-selector}.#{$name} {
- @include button-clear-style($color);
+ $individual-selector: if($button-fill == $filling, null, ' #{$buttongroup-child-selector}.#{$name}');
+
+ &.#{$name} #{$buttongroup-child-selector}, #{$individual-selector} {
+ @include button-fill-style($filling, $color, auto, auto);
}
}
}
+
}
&.no-gaps {
@mixin foundation-button {
.button {
- @include button;
+ @include button($style: none);
// Sizes
@each $size, $value in map-remove($button-sizes, default) {
}
}
- // Default styles (according to $button-fill)
- @each $name, $color in $button-palette {
- &.#{$name} {
- @include button-fill-style($button-fill, $color, auto, auto);
- }
- }
-
- // Hollow styles
- @if $button-fill != hollow {
- &.hollow {
- @include button-hollow;
- @include button-hollow-style;
-
- @each $name, $color in $button-palette {
- &.#{$name} {
- @include button-hollow-style($color);
- }
- }
- }
- }
+ // Solid, hollow & clear styles
+ @each $filling in (solid hollow clear) {
+ $selector: if($button-fill == $filling, null, '.#{$filling}');
- // Clear styles
- @if $button-fill != clear {
- &.clear {
- @include button-clear;
- @include button-clear-style;
+ &#{$selector} {
+ @include button-fill($filling);
+ @include button-fill-style($filling);
@each $name, $color in $button-palette {
&.#{$name} {
- @include button-clear-style($color);
+ @include button-fill-style($filling, $color, auto, auto);
}
}
}