Skip to content

Commit 77daa02

Browse files
author
Alexis Córdova
authored
Revert "feat(checkbox, radio-group): Wrap label text under text (#4769)" (#5019)
* Revert "feat(checkbox, radio-group): Wrap label text under text (#4769)" This reverts commit e683782. # Conflicts: # ui/components/checkbox/RELEASENOTES.md # ui/components/checkbox/base/_index.scss # ui/components/checkbox/base/example.jsx # ui/components/form-element/base/_index.scss # ui/components/radio-group/RELEASENOTES.md * Update release notes * Re-add radio examples * Revert mobile checkbox style changes * Revert Welcome Mat changes * Update examples
1 parent c0780b6 commit 77daa02

File tree

13 files changed

+40
-63
lines changed

13 files changed

+40
-63
lines changed

RELEASENOTES.general.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Release notes authoring guidelines: http://keepachangelog.com/ -->
22
<!-- On release, add general notes here. In time the legacy release notes will be add to this -->
33

4-
## 2.17.5 - February 7, 2022
4+
## 2.17.5 - February 10, 2022
55

66
- Updated design token `COLOR_BACKGROUND_DESTRUCTIVE_HOVER` so that it is a different color from `COLOR_BACKGROUND_DESTRUCTIVE`
77

RELEASENOTES.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
<!-- Release notes authoring guidelines: http://keepachangelog.com/ -->
22
<!-- !!! THIS FILE IS AUTO-GENERATED !!! DO NOT EDIT THIS FILE MANUALLY !!! -->
33

4-
## Release 2.17.5 - February 7, 2022
4+
## Release 2.17.5 - February 10, 2022
55

66
- Updated design token `COLOR_BACKGROUND_DESTRUCTIVE_HOVER` so that it is a different color from `COLOR_BACKGROUND_DESTRUCTIVE`
77

8-
## Release 2.17.4 - February 7, 2022
8+
## Components
9+
### [Checkbox](https://www.lightningdesignsystem.com/components/checkbox)
10+
#### Fixed
11+
- Reverted layout changes originally introduced in 2.17.0
12+
13+
### [Radio Group](https://www.lightningdesignsystem.com/components/radio-group)
14+
#### Fixed
15+
- Reverted label layout changes introduced in 2.17.0
16+
17+
### [Welcome Mat](https://www.lightningdesignsystem.com/components/welcome-mat)
18+
#### Fixed
19+
- Reverted changes to checkbox layout introduced in 2.17.4
20+
21+
## Release 2.17.4 - February 10, 2022
922

1023
## Components
1124
### [Checkbox](https://www.lightningdesignsystem.com/components/checkbox)

ui/components/checkbox/RELEASENOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
<!-- ## [Unreleased] -->
66

7+
## 2.17.5
8+
9+
### Fixed
10+
- Reverted layout changes originally introduced in 2.17.0
11+
712
## 2.17.4
813

914
### Fixed

ui/components/checkbox/base/_index.scss

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@
1414
* @variant
1515
*/
1616
.slds-checkbox {
17-
display: inline-flex;
17+
display: inline-block;
1818
position: relative;
1919

20-
// When changing checkbox labels to inline-flex (PR #4769), the position of the required asterisk needed to be repositioned
21-
> .slds-required {
22-
line-height: 1; // because the required symbol is text, it needs its line-height reset
23-
}
24-
2520
/**
2621
* @summary Creates a custom styled checkbox
2722
* @selector .slds-checkbox_faux
@@ -53,13 +48,11 @@
5348
* @restrict .slds-checkbox label
5449
*/
5550
.slds-checkbox__label {
56-
display: inline-flex;
5751

5852
// When slds-form-element__label is inline with slds-checkbox_faux, display as inline
5953
.slds-form-element__label {
6054
display: inline;
61-
padding-top: 0;
62-
line-height: $line-height-heading;
55+
vertical-align: middle;
6356
font-size: $font-size-3;
6457
}
6558
}

ui/components/checkbox/base/_touch.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
.slds-checkbox {
22

3-
> .slds-required {
4-
line-height: inherit;
5-
}
6-
73
.slds-checkbox_faux,
84
.slds-checkbox--faux {
95
@include square($square-tappable-x-small);
6+
flex-shrink: 0; // Contained within flex, we don't want checkbox to shrink
107
}
118

129
.slds-checkbox__label {

ui/components/checkbox/docs.mdx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ The [form element variant](#Form-Element) accommodates a top level label and add
5252
{getDisplayElementById(CheckboxExamples.states, 'required')}
5353
</CodeView>
5454

55-
<CodeView frameOnly frameTitle="Required checkbox example">{getDisplayElementById(CheckboxExamples.states, 'required')}</CodeView>
55+
<CodeView frameOnly frameTitle="Required checkbox example">
56+
{getDisplayElementById(CheckboxExamples.states, 'required')}
57+
</CodeView>
5658

5759
#### Error
5860

@@ -80,12 +82,6 @@ The [form element variant](#Form-Element) accommodates a top level label and add
8082

8183
<CodeView frameOnly frameTitle="Group checkbox example">{getDisplayElementById(CheckboxExamples.examples, 'group')}</CodeView>
8284

83-
##### Group with Wrapping Labels
84-
85-
<CodeView>{getDisplayElementById(CheckboxExamples.examples, 'wrapping-text')}</CodeView>
86-
87-
<CodeView frameOnly frameTitle="Group checkbox with wrapping text example">{getDisplayElementById(CheckboxExamples.examples, 'wrapping-text')}</CodeView>
88-
8985
##### Required
9086

9187
<CodeView>
@@ -94,11 +90,6 @@ The [form element variant](#Form-Element) accommodates a top level label and add
9490

9591
<CodeView frameOnly frameTitle="Required group checkbox example">{getDisplayElementById(CheckboxExamples.examples, 'group-required')}</CodeView>
9692

97-
##### Required with Wrapping Labels
98-
<CodeView>{getDisplayElementById(CheckboxExamples.examples, 'wrapping-text-required-group')}</CodeView>
99-
100-
<CodeView frameOnly frameTitle="Required group checkbox with wrapping text example">{getDisplayElementById(CheckboxExamples.examples, 'wrapping-text-required-group')}</CodeView>
101-
10293
##### Error
10394

10495
<CodeView>

ui/components/form-element/base/_index.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
// Force radios and checkboxes to be on own line when there are multiples in a group
4747
.slds-radio,
4848
.slds-checkbox {
49-
display: flex;
50-
margin-top: $spacing-xx-small;
49+
display: block;
5150
}
5251
}
5352

ui/components/form-element/horizontal/_index.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
float: left;
6565
max-width: calc(33% - #{$square-icon-utility-medium}); // Removing the width of the icon for when the help-text icon is present
6666
flex-basis: calc(33% - #{$square-icon-utility-medium}); // Some form element controls are set to display:flex
67-
flex-grow: 1; // For IE and Safari which didn't auto expand to the available space
6867
margin-bottom: 0;
6968
position: relative;
7069
z-index: 1;
@@ -100,7 +99,6 @@
10099
float: none;
101100
max-width: 100%;
102101
width: auto;
103-
flex-basis: auto; // For IE not taking up the available space
104102
}
105103
}
106104

@@ -111,7 +109,6 @@
111109
width: auto;
112110
max-width: 100%;
113111
flex-basis: auto;
114-
flex-grow: 1;
115112
float: none;
116113
position: relative;
117114
padding-left: 0;

ui/components/radio-group/RELEASENOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
<!-- ## [Unreleased] -->
66

7+
## 2.17.5
8+
9+
### Fixed
10+
- Reverted label layout changes introduced in 2.17.0
11+
712
## 2.17.0
813

914
### Added

ui/components/radio-group/base/_index.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,9 @@
4242
transition: border $duration-quickly linear, background-color $duration-quickly linear;
4343
}
4444

45-
.slds-radio__label {
46-
display: inline-flex;
47-
}
48-
4945
.slds-form-element__label {
5046
display: inline;
51-
padding-top: 0;
52-
line-height: $line-height-heading;
47+
vertical-align: middle;
5348
font-size: $font-size-3;
5449
}
5550

0 commit comments

Comments
 (0)