Skip to content

Commit c7e0e1d

Browse files
committed
Merge tag 'v2.21.1' of github.com:salesforce-ux/design-system-internal into opensource-summer-23
2 parents 73a6a4c + ed287b9 commit c7e0e1d

File tree

6 files changed

+34
-10
lines changed

6 files changed

+34
-10
lines changed

RELEASENOTES.general.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
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.21.1 - May 18, 2023
5+
6+
## Fixed
7+
8+
- Fixed grid column size classes where the `slds-col-` class now applies 'flex: 1 1 auto,' which breaks grid layouts when combined with `slds-small|medium|large-size_*` classes. This results in incomplete rows and layout issues.
49

510
## 2.21.0 - April 20, 2023
611

RELEASENOTES.md

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

4+
## Release 2.21.1 - May 18, 2023
5+
6+
## Fixed
7+
- Fixed grid column size classes where the `slds-col-` class now applies 'flex: 1 1 auto,' which breaks grid layouts when combined with `slds-small|medium|large-size_*` classes. This results in incomplete rows and layout issues.
8+
49
## Release 2.21.0 - April 20, 2023
510

611
## Fixed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"CSS"
99
],
1010
"homepage": "https://lightningdesignsystem.com",
11-
"version": "2.21.0",
11+
"version": "2.21.1",
1212
"author": "Salesforce",
1313
"bugs": {
1414
"url": "https://github.com/salesforce-ux/design-system/issues"

ui/_config.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
///
1010
/// @type String
1111
/// @access private
12-
$app-version: "2.21.0";
12+
$app-version: "2.21.1";
1313

1414
/// Debug mode (uncomment to activate)
1515
/// Turn on to output deprecation warnings during development

ui/utilities/sizing/_index.scss

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,23 @@ $_sizes: (
1515
'xx-large': $size-xx-large
1616
);
1717

18+
/// Column sizes
19+
/// @type array
20+
/// @private
21+
$_columnSizes: 1, 2, 3, 4, 5, 6, 7, 8, 12;
22+
1823
// All SLDS size classes like `slds-size--medium` and `slds-size--medium-1-of-12` in one string.
1924
// This is faster for style calculation than `[class*="slds-size_"]`.
2025
/// @private
2126
@function all-sizes () {
2227
$prefixes: 'slds-size_', 'slds-size--';
23-
$columnSizes: 1, 2, 3, 4, 5, 6, 7, 8, 12;
2428

2529
$result: '';
2630
@each $prefix in $prefixes {
2731
@each $size in map-keys($_sizes) {
2832
$result: "#{$result}, .#{$prefix}#{$size}";
2933
}
30-
@each $columnSize in $columnSizes {
34+
@each $columnSize in $_columnSizes {
3135
@for $i from 1 through $columnSize {
3236
$result: "#{$result}, .#{$prefix}#{$i}-of-#{$columnSize}";
3337
}
@@ -37,18 +41,28 @@ $_sizes: (
3741
@return str-slice($result, 3); // Remove initial ", "
3842
}
3943

40-
// All SLDS classes like `slds-small-size_medium` in one string.
44+
// All SLDS classes like `slds-small-size_medium` and `slds-small-size_1-of-12` in one string.
4145
// Note that the first size is only a breakpoint size, and the second is all possible sizes.
4246
// This is faster for style calculation than `[class*="slds-#{$breakpointSize}-size_"]`
4347
/// @private
44-
@function all-responsive-sizes ($breakpointSize, $prefix) {
48+
@function all-responsive-sizes ($breakpointSize, $prefix, $withColumnSizes) {
4549
$infixes: '-size_', '-size--';
4650

4751
$result: '';
52+
4853
@each $infix in $infixes {
54+
// e.g. `slds-small-size_medium`
4955
@each $size in map-keys($_sizes) {
5056
$result: "#{$result}, .#{$prefix}#{$breakpointSize}#{$infix}#{$size}";
5157
}
58+
// e.g. `slds-small-size_1_of_12`
59+
@if ($withColumnSizes) {
60+
@each $columnSize in $_columnSizes {
61+
@for $i from 1 through $columnSize {
62+
$result: "#{$result}, .#{$prefix}#{$breakpointSize}#{$infix}#{$i}-of-#{$columnSize}";
63+
}
64+
}
65+
}
5266
}
5367
@return str-slice($result, 3); // Remove initial ", "
5468
}
@@ -101,7 +115,7 @@ $_sizes: (
101115
@media (min-width: #{pem($breakpoint)}) {
102116

103117
// Fixes issue when sizing is used with slds-col
104-
#{all-responsive-sizes($size, 'slds-')} {
118+
#{all-responsive-sizes($size, 'slds-', true)} {
105119
flex: none;
106120
}
107121

@@ -133,7 +147,7 @@ $_sizes: (
133147
@media (max-width: #{pem($breakpoint)}) {
134148

135149
// Fixes issue when sizing is used with slds-col
136-
#{all-responsive-sizes($size, 'slds-max-')} {
150+
#{all-responsive-sizes($size, 'slds-max-', false)} {
137151
flex: none;
138152
}
139153

0 commit comments

Comments
 (0)