Skip to content

Commit

Permalink
fix(path): add focus and reorder active styles (#2974)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
engai committed Jan 31, 2018
1 parent 399da9c commit f197b4a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
63 changes: 36 additions & 27 deletions ui/components/path/base/_index.scss
Expand Up @@ -149,33 +149,6 @@
}
}

/**
* @summary Creates the active stage of the sales path
*
* @selector .slds-is-active
* @restrict .slds-path__item
* @notes This class must be placed on the item programatically when the guidance section is activated
*/
.slds-is-active {
background-color: $color-background-path-active;

.slds-path__link {
color: $color-text-inverse;
}

&:hover {
background-color: $color-background-path-active-hover;

+ .slds-path__item:before {
background-color: $color-background-path-active-hover;
}
}

+ .slds-path__item:before {
background-color: $color-background-path-active;
}
}

/**
* @summary Creates success stage of the path
*
Expand Down Expand Up @@ -233,6 +206,42 @@
}
}

/**
* @summary Creates the active stage of the sales path
*
* @selector .slds-is-active
* @restrict .slds-path__item
* @notes This class must be placed on the item programatically when the guidance section is activated
*/
.slds-is-active,
.slds-is-complete.slds-is-focused {
background-color: $color-background-path-active;

.slds-path__stage {
transform: translateY(-50%) rotateX(-180deg);
}

.slds-path__title {
transform: rotateX(0deg);
}

.slds-path__link {
color: $color-text-inverse;
}

&:hover {
background-color: $color-background-path-active-hover;

+ .slds-path__item:before {
background-color: $color-background-path-active-hover;
}
}

+ .slds-path__item:before {
background-color: $color-background-path-active;
}
}

/**
* @summary Creates the current stage of the path
*
Expand Down
2 changes: 1 addition & 1 deletion ui/components/path/tokens/background-color.yml
Expand Up @@ -18,7 +18,7 @@ props:
comment: The hover background color for Salespath stages that are complete.
COLOR_BACKGROUND_PATH_ACTIVE:
value: '{!DEEP_COVE}'
comment: The background color for Salespath stages that are complete.
comment: The background color for Salespath stages that are active.
COLOR_BACKGROUND_PATH_ACTIVE_HOVER:
value: '{!BISCAY}'
comment: The hovered background color for Salespath stages that are complete.
Expand Down

0 comments on commit f197b4a

Please sign in to comment.