]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix #9521 - Single button in expanded button group 9522/head
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 18 Dec 2016 04:11:56 +0000 (05:11 +0100)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 18 Dec 2016 04:11:56 +0000 (05:11 +0100)
Fix https://github.com/zurb/foundation-sites/issues/9521
A single button in a expanded button group was not expanded.

Changes:
- Add `width:100%` to the button when it is the only one in the button
group.

Note: The way we are currently handling button groups is really dirty.

scss/components/_button-group.scss

index 6f6fc1960a8fdaf7ea8f6bb5883401237056f732..c1404b5d5124a68edde35c9b111d1214c911daa7 100644 (file)
@@ -94,6 +94,12 @@ $buttongroup-radius-on-each: true !default;
       flex: 1 1 0px; // sass-lint:disable-line zero-unit
     }
     @else {
+      // One child
+      &:first-child:last-child {
+        width: 100%
+      }
+
+      // Two or more childreen
       @for $i from 2 through $buttongroup-expand-max {
         &:first-child:nth-last-child(#{$i}) {
           &, &:first-child:nth-last-child(#{$i}) ~ #{$selector} {