Skip to content

Commit 01a8612

Browse files
patch(hooks): Treat Styling Hooks targeting text color as an element, previously referred to as a property (#4431)
* patch(hooks): Treat Styling Hooks targeting text color as an element, previous referred to as a property * release notes * Clean up * Fix name
1 parent 257b86c commit 01a8612

File tree

18 files changed

+125
-42
lines changed

18 files changed

+125
-42
lines changed

RELEASENOTES.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,45 @@
44
## Release 2.13.3 - September 24, 2020
55

66
## Components
7+
### [Alert](https://www.lightningdesignsystem.com/components/alert)
8+
#### Changed
9+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-alert-color-text` => `--sds-c-alert-text-color`.
10+
11+
### [Avatar](https://www.lightningdesignsystem.com/components/avatar)
12+
#### Changed
13+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-avatar-initials-color-text` => `--sds-c-avatar-initials-text-color`.
14+
15+
### [Badges](https://www.lightningdesignsystem.com/components/badges)
16+
#### Changed
17+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-badge-color-text` => `--sds-c-badge-text-color`.
18+
19+
### [Buttons](https://www.lightningdesignsystem.com/components/buttons)
20+
#### Added
21+
- Added Styling Hook for box-shadow
22+
- Added Styling Hook for block level padding
23+
#### Changed
24+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-button-color-text` => `--sds-c-button-text-color`.
25+
726
### [Modals](https://www.lightningdesignsystem.com/components/modals)
827
#### Fixed
928
- Fixed incorrect styling hooks on footer.
1029

30+
### [Pills](https://www.lightningdesignsystem.com/components/pills)
31+
#### Changed
32+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-pill-color-text` => `--sds-c-pill-text-color`.
33+
34+
### [Scoped Tabs](https://www.lightningdesignsystem.com/components/scoped-tabs)
35+
#### Changed
36+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-tabs-scoped-color-text` => `--sds-c-tabs-scoped-text-color`.
37+
38+
### [Tabs](https://www.lightningdesignsystem.com/components/tabs)
39+
#### Changed
40+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-tabs-item-color-text` => `--sds-c-tabs-item-text-color`.
41+
42+
### [Tooltips](https://www.lightningdesignsystem.com/components/tooltips)
43+
#### Changed
44+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-tooltip-color-text` => `--sds-c-tooltip-text-color`.
45+
1146
## Release 2.13.2 - September 23, 2020
1247

1348
- Added added icons synonym metadata to SLDS dist

ui/components/alert/RELEASENOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# Alert Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.13.3
7+
8+
### Changed
9+
10+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-alert-color-text` => `--sds-c-alert-text-color`.
611

712
## 2.13.0
813

ui/components/alert/base/_index.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
padding-right: var(--sds-c-alert-spacing-inline-end, $spacing-x-large);
2121
padding-bottom: var(--sds-c-alert-spacing-block-end, $spacing-x-small);
2222
padding-left: var(--sds-c-alert-spacing-inline-start, $spacing-x-small);
23-
color: var(--sds-c-alert-color-text, $color-text-inverse);
23+
color: var(--sds-c-alert-text-color, $color-text-inverse);
2424
font-weight: var(--sds-c-alert-font-weight, $font-weight-light);
2525
text-align: center;
2626
background-color: var(--sds-c-alert-color-background, $color-background-toast);
@@ -44,12 +44,12 @@
4444

4545
&:active {
4646
// @todo re-evaluate Styling Hooks reassignment
47-
color: var(--sds-c-alert-color-text-active, $color-text-link-inverse-active);
47+
color: var(--sds-c-alert-text-color-active, $color-text-link-inverse-active);
4848
}
4949

5050
&[disabled] {
5151
// @todo re-evaluate Styling Hooks reassignment
52-
color: var(--sds-c-alert-color-text-disabled, $color-text-link-inverse-disabled);
52+
color: var(--sds-c-alert-text-color-disabled, $color-text-link-inverse-disabled);
5353
}
5454
}
5555

ui/components/avatar/RELEASENOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# Avatar Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.13.3
7+
8+
### Changed
9+
10+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-avatar-initials-color-text` => `--sds-c-avatar-initials-text-color`.
611

712
## 2.13.0
813

ui/components/avatar/base/_index.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
border-radius: var(--sds-c-avatar-radius-border, $border-radius-medium);
2020
line-height: $line-height-reset;
2121
font-size: $font-size-heading-small;
22-
color: var(--sds-c-avatar-color-text, $color-text-inverse);
22+
color: var(--sds-c-avatar-text-color, $color-text-inverse);
2323

2424
&:hover,
2525
&:focus:hover {
@@ -198,6 +198,7 @@
198198
*/
199199
.slds-avatar__initials {
200200
@include absolute-center;
201+
color: var(--sds-c-avatar-initials-text-color);
201202
height: 100%;
202203
text-shadow: 0 0 1px rgba(0, 0, 0, 0.8);
203204

@@ -207,7 +208,7 @@
207208
}
208209

209210
&:hover {
210-
color: $color-text-inverse;
211+
color: var(--sds-c-avatar-initials-text-color-hover, $color-text-inverse);
211212
cursor: default;
212213
}
213214
}
@@ -221,12 +222,12 @@
221222
* @group color
222223
*/
223224
.slds-avatar__initials_inverse {
224-
background-color: var(--sds-c-avatar-initials-inverse-color-background, $color-background);
225-
color: var(--sds-c-avatar-initials-inverse-color-text, $color-text-weak);
225+
background-color: $color-background;
226+
color: $color-text-weak;
226227
text-shadow: none;
227228

228229
// combat abbr override styling in avatar
229230
&:hover {
230-
color: var(--sds-c-avatar-initials-inverse-color-text, $color-text-weak);
231+
color: $color-text-weak;
231232
}
232233
}

ui/components/badges/RELEASENOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# Badges Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.13.3
7+
8+
### Changed
9+
10+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-badge-color-text` => `--sds-c-badge-text-color`.
611

712
## 2.13.0
813

ui/components/badges/base/_index.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
font-size: var(--sds-c-badge-font-size, $font-size-2);
2121
font-weight: $font-weight-bold;
2222
line-height: var(--sds-c-badge-line-height, normal);
23-
color: var(--sds-c-badge-color-text, $color-text-default);
23+
color: var(--sds-c-badge-text-color, $color-text-default);
2424
white-space: nowrap;
2525
display: inline-flex;
2626
align-items: center;
@@ -47,7 +47,7 @@
4747
background-color: var(--sds-c-badge-inverse-color-background, $badge-color-background-inverse);
4848

4949
// @todo re-evaluate Styling Hooks reassignment
50-
color: var(--sds-c-badge-inverse-color-text, $color-text-inverse);
50+
color: var(--sds-c-badge-inverse-text-color, $color-text-inverse);
5151
}
5252

5353
/**

ui/components/buttons/RELEASENOTES.md

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

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

7+
## 2.13.3
8+
9+
### Added
10+
11+
- Added Styling Hook for box-shadow
12+
- Added Styling Hook for block level padding
13+
14+
### Changed
15+
16+
- Treat Styling Hooks targeting text color as an element, previously referred to as a property. e.g. `--sds-c-button-color-text` => `--sds-c-button-text-color`.
17+
718
## 2.13.1
819

920
### Fixed

0 commit comments

Comments
 (0)