Skip to content

Commit ef6ccc4

Browse files
authored
feat(button): split tertiarylinepadding variable
I wanted to set a horizontal padding of 0 for tertiary buttons, so I changed tertiaryLinePadding to '0.5em 0'. But it resulted in a build error, because this variable is also used for calculating tertiary button margin. I think it's better so split this variable into vertical and horizontal values and then use the vertical value for calculating the margins. This also aligns better with other button variables (verticalPadding and compactVerticalPadding).
1 parent d50fad4 commit ef6ccc4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/definitions/elements/button.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,11 +892,11 @@
892892
.ui.tertiary.button {
893893
transition: color @defaultDuration @defaultEasing !important;
894894
border-radius: 0;
895-
margin: (@verticalPadding - @tertiaryLinePadding)
895+
margin: (@verticalPadding - @tertiaryVerticalPadding)
896896
(@horizontalMargin)
897-
(@verticalPadding + @shadowOffset + @verticalMargin - @tertiaryLinePadding)
897+
(@verticalPadding + @shadowOffset + @verticalMargin - @tertiaryVerticalPadding)
898898
0 !important;
899-
padding: @tertiaryLinePadding !important;
899+
padding: @tertiaryVerticalPadding @tertiaryHorizontalPadding !important;
900900

901901
& when (@tertiaryWithUnderline = true) {
902902
box-shadow: inset 0 -@tertiaryLineHeight 0 @tertiaryLineColor;

src/themes/default/elements/button.variables

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@
253253
/*-------------
254254
Tertiary
255255
-------------*/
256-
@tertiaryLinePadding: 0.5em;
256+
@tertiaryVerticalPadding: 0.5em;
257+
@tertiaryHorizontalPadding: 0.5em;
257258
@tertiaryLineHeight: 0.2em;
258259
@tertiaryTextColor: @textColor;
259260
@tertiaryLineColor: lighten(@tertiaryTextColor, 20%);

0 commit comments

Comments
 (0)