diff --git a/pages/_docs/steps.md b/pages/_docs/steps.md index f8f9e8ac21abc680ba7060623cde61395276c255..aeddc4a122137973cbb310b6e2dd05ab9c57d052 100644 --- a/pages/_docs/steps.md +++ b/pages/_docs/steps.md @@ -7,27 +7,26 @@ Steps are progress indicators of a sequence of task steps. ### Default markup {% example html %} -{% include ui/steps.html %} +{% include ui/steps.html show-title=true %} {% endexample %} -### Size +### Tooltips {% example html %} -{% include ui/steps.html size="md" %} -{% include ui/steps.html size="lg" %} +{% include ui/steps.html show-title=true show-tooltip=true %} {% endexample %} ### Color {% example html %} -{% include ui/steps.html color="green" %} -{% include ui/steps.html color="red" %} +{% include ui/steps.html color="green" show-title=true %} +{% include ui/steps.html color="red" show-title=true %} {% endexample %} -### Steps with title +### Steps without title {% example html %} -{% include ui/steps.html show-title=true %} +{% include ui/steps.html show-tooltip=true %} {% endexample %} ### Steps with numbers diff --git a/pages/_includes/ui/steps.html b/pages/_includes/ui/steps.html index f5c045527ca1235b154aefa5d6c37a0571cd809d..a07be05e13a8fdfaa16ab6eb66b845cfd019bb57 100644 --- a/pages/_includes/ui/steps.html +++ b/pages/_includes/ui/steps.html @@ -4,7 +4,7 @@ {% for i in (1..count) %} {% assign elem = 'a' %} {% if i > active %}{% assign elem = 'span' %}{% endif %} - <{{ elem }} href="#" class="step-item{% if i == active %} active{% endif %}" data-toggle="tooltip" title="Step {{ i }} description">{% if include.show-title %} + <{{ elem }} href="#" class="step-item{% if i == active %} active{% endif %}"{% if include.show-tooltip %} data-toggle="tooltip" title="Step {{ i }} description"{% endif %}>{% if include.show-title %} Step {{ i }} {% endif %} {% endfor %} diff --git a/scss/ui/_steps.scss b/scss/ui/_steps.scss index f735f7ab2bc89a9674e10d8ac11fddcaed81bd34..a431051045070b9aaafc37017c86778b24ba594c 100644 --- a/scss/ui/_steps.scss +++ b/scss/ui/_steps.scss @@ -1,4 +1,5 @@ $steps-border-width: 2px; +$steps-color-inactive: #f3f5f5; @mixin step-size($border-width, $dot-size: 1rem) { .step-item { @@ -21,10 +22,12 @@ $steps-border-width: 2px; &:after, &:before { background: $color; + color: $white; } &.active:before { border-color: $color; + color: inherit; } } } @@ -40,14 +43,6 @@ $steps-border-width: 2px; @include step-color($primary); } -.steps-md { - @include step-size(4px); -} - -.steps-lg { - @include step-size(8px); -} - @each $color, $value in $colors { .steps-#{$color} { @include step-color($value); @@ -100,9 +95,15 @@ $steps-border-width: 2px; } & ~ .step-item { + color: $text-muted-light; + &:after, &:before { - background: $border-color; + background: $steps-color-inactive; + } + + &:before { + color: $text-muted-light !important; } } } @@ -110,12 +111,21 @@ $steps-border-width: 2px; .steps-counter { counter-reset: steps; + @include step-size(2px, 1.5rem); .step-item { counter-increment: steps; &:before { - content: counter(steps) + content: counter(steps); + line-height: 1.5rem; + font-size: 1rem; + } + + &.active ~ .step-item { + &:before { + background: #fff; + } } } }