UNPKG

yyzone

Version:

yyzone vue components and utils

140 lines (123 loc) 2.87 kB
@prefixProgressCls: ~"@{yy-css-prefix}progress"; .@{prefixProgressCls} { display: inline-block; width: 100%; &-vertical { height: 100%; width: auto; } font-size: @yy-font-size-small; position: relative; &-outer { display: inline-block; width: 100%; margin-right: 0; padding-right: 0; box-sizing: border-box; .@{prefixProgressCls}-show-info & { padding-right: 55px; margin-right: -55px; } } &-vertical &-outer { height: 100%; width: auto; } &-inner { display: inline-block; width: 100%; background-color: #f3f3f3; border-radius: 100px; vertical-align: middle; position: relative; } &-vertical &-inner { height: 100%; width: auto; & > *, &:after { display: inline-block; vertical-align: bottom; } &:after { content: ''; height: 100%; } } &-bg { border-radius: 100px; background-color: @yy-primary-color; transition: all @yy-transition-time linear; position: relative; } &-success-bg{ border-radius: 100px; background-color: @yy-success-color; transition: all @yy-transition-time linear; position: absolute; top: 0; left: 0; } &-text { display: inline-block; margin-left: 5px; text-align: left; font-size: 1em; vertical-align: middle; } &-active { .@{prefixProgressCls}-bg:before { content: ''; opacity: 0; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 10px; animation: yy-progress-active 2s @yy-ease-in-out infinite; } } &-vertical&-active{ .@{prefixProgressCls}-bg:before { top: auto; animation: yy-progress-active-vertical 2s @yy-ease-in-out infinite; } } &-wrong { .@{prefixProgressCls}-bg { background-color: @yy-error-color; } .@{prefixProgressCls}-text { color: @yy-error-color; } } &-success { .@{prefixProgressCls}-bg { background-color: @yy-success-color; } .@{prefixProgressCls}-text { color: @yy-success-color; } } } @keyframes yy-progress-active { 0% { opacity: .3; width: 0; } 100% { opacity: 0; width: 100%; } } @keyframes yy-progress-active-vertical { 0% { opacity: .3; height: 0; } 100% { opacity: 0; height: 100%; } }