Skip to content

Commit 4f35fcb

Browse files
authored
fix(button): Make button line-height a hook assignment in touch CSS (#4598)
* make button line height a hook assignment in touch CSS * add release note * convert mixin to func
1 parent 4158700 commit 4f35fcb

File tree

12 files changed

+36
-30
lines changed

12 files changed

+36
-30
lines changed

RELEASENOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
### [Buttons](https://www.lightningdesignsystem.com/components/buttons)
3636
#### Added
3737
- Added Kinetic styles and demo functionality for Button Base, Brand, Neutral, Inverse, Outline Brand, Destructive and Success
38+
#### Changed
39+
- Changed `line-height` assignment in touch styles to use Styling Hook assignment of `--sds-c-button-line-height`.
3840

3941
### [Drop Zone](https://www.lightningdesignsystem.com/components/drop-zone)
4042
#### Changed

ui/components/buttons/RELEASENOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
- Added Kinetic styles and demo functionality for Button Base, Brand, Neutral, Inverse, Outline Brand, Destructive and Success
1212

13+
### Changed
14+
15+
- Changed `line-height` assignment in touch styles to use Styling Hook assignment of `--sds-c-button-line-height`.
16+
1317
## 2.14.0
1418

1519
### Added
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.slds-button {
2-
@include border-box-line-height($height-tappable);
2+
--sds-c-button-line-height: #{border-box-line-height($height-tappable)};
33
font-weight: $font-weight-bold;
44
}

ui/components/checkbox-button-group/base/_touch.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232

3333
.slds-checkbox_button,
3434
.slds-checkbox--button {
35-
@include border-box-line-height($height-tappable);
35+
line-height: border-box-line-height($height-tappable);
3636
}

ui/components/combobox/base/_touch.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
.slds-listbox__option_plain,
1717
.slds-listbox__option--plain {
18-
@include border-box-line-height($height-tappable, 0);
18+
line-height: border-box-line-height($height-tappable, 0);
1919
padding-top: 0;
2020
padding-bottom: 0;
2121
align-items: center;
@@ -54,7 +54,7 @@
5454
.slds-has-object-switcher {
5555

5656
.slds-combobox__input {
57-
@include border-box-line-height($height-tappable, 0, $spacing-xxx-small * 2);
57+
line-height: border-box-line-height($height-tappable, 0, $spacing-xxx-small * 2);
5858
min-height: $height-tappable;
5959
}
6060
}

ui/components/input/base/_touch.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.slds-input {
2-
@include border-box-line-height($height-tappable);
2+
line-height: border-box-line-height($height-tappable);
33

44
&[readonly] {
55
font-size: $font-size-5;

ui/components/lookups-mobile/combobox/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
// Requirement of project that these properties are statically these
6464
// mobile/touch values and not scoped to the mobile/touch feature detection
6565
.slds-input {
66-
@include border-box-line-height($height-tappable);
66+
line-height: border-box-line-height($height-tappable);
6767
font-size: $font-size-5;
6868
}
6969
}

ui/components/lookups-mobile/listbox/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
}
4848

4949
.slds-mobile-lookup__listbox_trigger {
50-
@include border-box-line-height($height-tappable);
50+
line-height: border-box-line-height($height-tappable);
5151
justify-content: unset;
5252
font-size: $font-size-5;
5353
font-weight: $font-weight-bold;

ui/components/menus/dropdown/_touch.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
&__item {
66

77
> a {
8-
@include border-box-line-height($height-tappable, 0);
8+
line-height: border-box-line-height($height-tappable, 0);
99
padding: 0 $spacing-small;
1010
}
1111
}

ui/components/pills/base/_touch.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.slds-pill {
2-
@include border-box-line-height($height-tappable-small);
2+
line-height: border-box-line-height($height-tappable-small);
33
padding: 0 $spacing-x-small;
44

55
+ .slds-pill {

0 commit comments

Comments
 (0)