From 5d1c134c745bdd45a68dc8a56def42cf66e5a138 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Sun, 18 Dec 2016 05:11:56 +0100 Subject: [PATCH] Fix #9521 - Single button in expanded button group 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scss/components/_button-group.scss b/scss/components/_button-group.scss index 6f6fc1960..c1404b5d5 100644 --- a/scss/components/_button-group.scss +++ b/scss/components/_button-group.scss @@ -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} { -- 2.47.2