From e123cb8693a271e4f88659f02d636f0111c444ab Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Tue, 19 Dec 2023 19:11:23 +0100 Subject: [PATCH] feat(button): support circular (spaced) button (groups) The circular variant was missing group support and did not work inside the spaced variation --- src/definitions/elements/button.less | 28 +++++++++++++++++--- src/themes/default/elements/button.variables | 2 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/definitions/elements/button.less b/src/definitions/elements/button.less index 07cf1f0b89..a01e1d206d 100755 --- a/src/definitions/elements/button.less +++ b/src/definitions/elements/button.less @@ -885,7 +885,7 @@ border-top: @basicGroupBorder; } - .ui.basic.vertical.buttons:not(.spaced) .button:first-child { + .ui.basic.vertical.buttons:not(.spaced):not(.circular) .button:first-child { border-top: none; } } @@ -1095,8 +1095,8 @@ /* -------------- Circular --------------- */ - - .ui.circular.button { + .ui.ui.circular.buttons .button, + .ui.ui.ui.ui.circular.button { border-radius: @circularBorderRadius; } @@ -1104,6 +1104,28 @@ width: @circularIconWidth; vertical-align: baseline; } + + .ui.circular.buttons:not(.vertical) .button { + margin-right: @circularGroupMargin; + } + + & when (@variationButtonVertical) { + .ui.vertical.circular.buttons .button { + margin-bottom: @circularVerticalGroupMargin; + } + } + + & when (@variationButtonBasic) { + .ui.circular.basic.buttons { + border: none; + & .button { + border: @basicGroupBorder; + &.basic { + border: none; + } + } + } + } } & when (@variationButtonOr) { diff --git a/src/themes/default/elements/button.variables b/src/themes/default/elements/button.variables index 6b6377d376..a9a4414abd 100644 --- a/src/themes/default/elements/button.variables +++ b/src/themes/default/elements/button.variables @@ -394,6 +394,8 @@ /* Circular */ @circularBorderRadius: 10em; @circularIconWidth: 1em; +@circularGroupMargin: 0.25em; +@circularVerticalGroupMargin: @circularGroupMargin; /* Spaced */ @spacedMargin: 1em;