Skip to content

Commit f197b4a

Browse files
authored
fix(path): add focus and reorder active styles (#2974)
* fix(path): add focus and reorder active styles * fix(path): add slds-is-focused class * fix(path): scope to slds-is-complete * feat(path): reuse active styling
1 parent 399da9c commit f197b4a

File tree

2 files changed

+37
-28
lines changed

2 files changed

+37
-28
lines changed

ui/components/path/base/_index.scss

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -149,33 +149,6 @@
149149
}
150150
}
151151

152-
/**
153-
* @summary Creates the active stage of the sales path
154-
*
155-
* @selector .slds-is-active
156-
* @restrict .slds-path__item
157-
* @notes This class must be placed on the item programatically when the guidance section is activated
158-
*/
159-
.slds-is-active {
160-
background-color: $color-background-path-active;
161-
162-
.slds-path__link {
163-
color: $color-text-inverse;
164-
}
165-
166-
&:hover {
167-
background-color: $color-background-path-active-hover;
168-
169-
+ .slds-path__item:before {
170-
background-color: $color-background-path-active-hover;
171-
}
172-
}
173-
174-
+ .slds-path__item:before {
175-
background-color: $color-background-path-active;
176-
}
177-
}
178-
179152
/**
180153
* @summary Creates success stage of the path
181154
*
@@ -233,6 +206,42 @@
233206
}
234207
}
235208

209+
/**
210+
* @summary Creates the active stage of the sales path
211+
*
212+
* @selector .slds-is-active
213+
* @restrict .slds-path__item
214+
* @notes This class must be placed on the item programatically when the guidance section is activated
215+
*/
216+
.slds-is-active,
217+
.slds-is-complete.slds-is-focused {
218+
background-color: $color-background-path-active;
219+
220+
.slds-path__stage {
221+
transform: translateY(-50%) rotateX(-180deg);
222+
}
223+
224+
.slds-path__title {
225+
transform: rotateX(0deg);
226+
}
227+
228+
.slds-path__link {
229+
color: $color-text-inverse;
230+
}
231+
232+
&:hover {
233+
background-color: $color-background-path-active-hover;
234+
235+
+ .slds-path__item:before {
236+
background-color: $color-background-path-active-hover;
237+
}
238+
}
239+
240+
+ .slds-path__item:before {
241+
background-color: $color-background-path-active;
242+
}
243+
}
244+
236245
/**
237246
* @summary Creates the current stage of the path
238247
*

ui/components/path/tokens/background-color.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ props:
1818
comment: The hover background color for Salespath stages that are complete.
1919
COLOR_BACKGROUND_PATH_ACTIVE:
2020
value: '{!DEEP_COVE}'
21-
comment: The background color for Salespath stages that are complete.
21+
comment: The background color for Salespath stages that are active.
2222
COLOR_BACKGROUND_PATH_ACTIVE_HOVER:
2323
value: '{!BISCAY}'
2424
comment: The hovered background color for Salespath stages that are complete.

0 commit comments

Comments
 (0)