Skip to content

Commit

Permalink
Merge pull request #1 from snide/style/steps
Browse files Browse the repository at this point in the history
Minor touchup to horiz steps
  • Loading branch information
cchaos authored Feb 9, 2018
2 parents 6895695 + 816d1cc commit 7cb11f0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ exports[`EuiStepsHorizontal is rendered 1`] = `
class="euiStepHorizontal__number"
>
<svg
class="euiIcon euiIcon--medium euiIcon--ghost"
class="euiIcon euiStepHorizontal__disabledIcon euiIcon--medium"
height="16"
viewBox="0 0 16 16"
width="16"
Expand Down
32 changes: 30 additions & 2 deletions src/components/steps/_steps_horizontal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@
// focus state
&:focus {
.euiStepHorizontal__number {
//box-shadow: 0 0 0 2px rgba($euiColorPrimary, .2);
background: $euiColorPrimary;
color: $euiColorEmptyShade;
animation: $euiAnimSpeedSlow $euiAnimSlightResistance 1 normal forwards focusRingAnimate;
}

.euiStepHorizontal__title {
text-decoration: underline;
}
}

&:hover:not(:disabled) {

.euiStepHorizontal__number {
animation: $euiAnimSpeedSlow $euiAnimSlightResistance 1 normal forwards focusRingAnimate;
}

Expand Down Expand Up @@ -74,6 +86,8 @@
@include createStepsNumber;
position: relative; /* 2 */
z-index: $euiZLevel1; /* 2 */
transition: background-color $euiAnimSpeedSlow $euiAnimSlightResistance,
color $euiAnimSpeedSlow $euiAnimSlightResistance;

// if it contains an icon, it needs to shift up a couple px
> .euiIcon {
Expand All @@ -82,6 +96,11 @@
}
}


.euiStepHorizontal__disabledIcon {
fill: $euiColorDarkShade;
}

.euiStepHorizontal__title {
display: block;
@include euiTitle;
Expand All @@ -98,11 +117,20 @@
.euiStepHorizontal-isIncomplete {
.euiStepHorizontal__number {
background-color: $euiColorLightShade;
color: $euiColorDarkShade;
}

.euiStepHorizontal__title {
color: $euiColorDarkShade;
}

&:hover:not(:disabled) {

.euiStepHorizontal__number {
background-color: $euiColorPrimary;
color: $euiColorEmptyShade;
}
}
}

// Complete state
Expand Down Expand Up @@ -147,6 +175,6 @@
box-shadow: 0 0 0 10px rgba($euiColorPrimary, 0);
}
100% {
box-shadow: 0 0 0 2px rgba($euiColorPrimary, .2);
box-shadow: 0 0 0 4px rgba($euiColorPrimary, .2);
}
}
2 changes: 1 addition & 1 deletion src/components/steps/step_horizontal.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const EuiStepHorizontal = ({

if (disabled) {
numberNode = (
<EuiIcon type="lock" color="ghost" />
<EuiIcon type="lock" className="euiStepHorizontal__disabledIcon" />
);
titleAppendix = ' is disabled';
} else if (isComplete) {
Expand Down

0 comments on commit 7cb11f0

Please sign in to comment.