Skip to content

Commit

Permalink
Merge pull request #18 from vianetz/customizable_steps
Browse files Browse the repository at this point in the history
Improve steps component with internal variables for more flexibility
  • Loading branch information
ma4nn authored Oct 5, 2023
2 parents 3c059b9 + 40273d8 commit 923bec9
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/_steps.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@use "variables";

$active-color: variables.$primary-color !default;
$highlight-color: variables.$light-color !default;
$line-color: variables.$border-color !default;
$link-color: variables.$gray-color !default;

// Steps
.step {
display: flex;
Expand All @@ -16,7 +21,7 @@
position: relative;

&:not(:first-child)::before {
background: variables.$primary-color;
background: $active-color;
content: "";
height: 2px;
left: -50%;
Expand All @@ -26,14 +31,14 @@
}

a {
color: variables.$primary-color;
color: $active-color;
display: inline-block;
padding: 20px 10px 0;
text-decoration: none;

&::before {
background: variables.$primary-color;
border: variables.$border-width-lg solid variables.$light-color;
background: $active-color;
border: variables.$border-width-lg solid $highlight-color;
border-radius: 50%;
content: "";
display: block;
Expand All @@ -50,21 +55,21 @@
&.active {
a {
&::before {
background: variables.$light-color;
border: variables.$border-width-lg solid variables.$primary-color;
background: $highlight-color;
border: variables.$border-width-lg solid $active-color;
}
}

& ~ .step-item {
&::before {
background: variables.$border-color;
background: $line-color;
}

a {
color: variables.$gray-color;
color: $link-color;

&::before {
background: variables.$border-color;
background: $line-color;
}
}
}
Expand Down

0 comments on commit 923bec9

Please sign in to comment.