Skip to content

Commit

Permalink
feat(button): support stackable buttons
Browse files Browse the repository at this point in the history
This PR support stackable buttons group variation to automatic stack a button group on mobile devices
  • Loading branch information
lubber-de authored Oct 16, 2020
1 parent 62dcda8 commit 943961b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/definitions/elements/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,33 @@
Variations
*******************************/

& when (@variationButtonStackable) {
/*--------------
Stackable
---------------*/

/* Tablet Or Below */
@media only screen and (max-width: @largestMobileScreen) {

.ui.stackable.buttons {
flex-direction: column;
width: 100%;
& .button:first-child {
border-bottom-left-radius: 0;
border-top-right-radius: @borderRadius;
}
& .button:last-child {
border-bottom-left-radius: @borderRadius;
border-top-right-radius: 0;
}
& .button:only-child {
border-radius: @borderRadius;
}
}

}
}

& when (@variationButtonFloated) {
/*-------------------
Floated
Expand Down
1 change: 1 addition & 0 deletions src/themes/default/globals/variation.variables
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
@variationButtonFluid: true;
@variationButtonCircular: true;
@variationButtonGroups: true;
@variationButtonStackable: true;
@variationButtonSizes: @variationAllSizes;

/* Container */
Expand Down

0 comments on commit 943961b

Please sign in to comment.