UNPKG

tav-ui

Version:
66 lines (57 loc) 1.3 kB
@import "../var/index.less"; .ta-strength-meter { &-bar { position: relative; height: 6px; margin: 10px auto 6px; background-color: @disabled-color; border-radius: @primary-border-radius; &::before, &::after { position: absolute; z-index: 10; display: block; width: 20%; height: inherit; background-color: transparent; border-color: @white; border-style: solid; border-width: 0 5px; content: ""; } &::before { left: 20%; } &::after { right: 20%; } &--fill { position: absolute; width: 0; height: inherit; background-color: transparent; border-radius: inherit; transition: width 0.5s ease-in-out, background 0.25s; &[data-score="0"] { width: 20%; background-color: darken(@error-color, 10%); } &[data-score="1"] { width: 40%; background-color: @error-color; } &[data-score="2"] { width: 60%; background-color: @warning-color; } &[data-score="3"] { width: 80%; background-color: fade(@success-color, 50%); } &[data-score="4"] { width: 100%; background-color: @success-color; } } } }