ant-design-vue/components/progress/style/index.less

169 lines
3.2 KiB
Plaintext
Raw Normal View History

2019-01-02 13:01:56 +00:00
@import '../../style/themes/default';
@import '../../style/mixins/index';
2018-04-03 06:14:38 +00:00
2019-01-02 13:01:56 +00:00
@progress-prefix-cls: ~'@{ant-prefix}-progress';
2018-04-03 06:14:38 +00:00
.@{progress-prefix-cls} {
.reset-component;
display: inline-block;
&-line {
2019-03-30 08:06:06 +00:00
position: relative;
2018-04-03 06:14:38 +00:00
width: 100%;
font-size: @font-size-base;
}
&-small&-line,
&-small&-line &-text .@{iconfont-css-prefix} {
font-size: @font-size-sm;
}
&-outer {
display: inline-block;
width: 100%;
margin-right: 0;
padding-right: 0;
.@{progress-prefix-cls}-show-info & {
2019-01-02 13:01:56 +00:00
margin-right: ~'calc(-2em - 8px)';
2019-03-30 08:06:06 +00:00
padding-right: ~'calc(2em + 8px)';
2018-04-03 06:14:38 +00:00
}
}
&-inner {
2019-03-30 08:06:06 +00:00
position: relative;
2018-04-03 06:14:38 +00:00
display: inline-block;
width: 100%;
2019-03-30 08:06:06 +00:00
vertical-align: middle;
2018-04-03 06:14:38 +00:00
background-color: @progress-remaining-color;
border-radius: 100px;
}
&-circle-trail {
stroke: @progress-remaining-color;
}
&-circle-path {
2019-01-02 13:01:56 +00:00
animation: ~'@{ant-prefix}-progress-appear' 0.3s;
2019-03-30 08:06:06 +00:00
stroke: @progress-default-color;
2018-04-03 06:14:38 +00:00
}
&-success-bg,
&-bg {
2019-03-30 08:06:06 +00:00
position: relative;
2018-04-03 06:14:38 +00:00
background-color: @progress-default-color;
2019-01-02 13:01:56 +00:00
transition: all 0.4s @ease-out-circ 0s;
2018-04-03 06:14:38 +00:00
}
&-success-bg {
position: absolute;
top: 0;
left: 0;
2019-03-30 08:06:06 +00:00
background-color: @success-color;
2018-04-03 06:14:38 +00:00
}
&-text {
2019-03-30 08:06:06 +00:00
display: inline-block;
2018-04-03 06:14:38 +00:00
width: 2em;
margin-left: 8px;
color: @text-color-secondary;
2019-03-30 08:06:06 +00:00
font-size: 1em;
2018-04-03 06:14:38 +00:00
line-height: 1;
2019-03-30 08:06:06 +00:00
white-space: nowrap;
text-align: left;
vertical-align: middle;
word-break: normal;
2018-04-03 06:14:38 +00:00
.@{iconfont-css-prefix} {
font-size: @font-size-base;
}
}
&-status-active {
2019-03-30 08:06:06 +00:00
.@{progress-prefix-cls}-bg::before {
2018-04-03 06:14:38 +00:00
position: absolute;
top: 0;
right: 0;
bottom: 0;
2019-03-30 08:06:06 +00:00
left: 0;
2018-04-03 06:14:38 +00:00
background: @component-background;
border-radius: 10px;
2019-03-30 08:06:06 +00:00
opacity: 0;
2019-01-02 13:01:56 +00:00
animation: ~'@{ant-prefix}-progress-active' 2.4s @ease-out-quint infinite;
2019-03-30 08:06:06 +00:00
content: '';
2018-04-03 06:14:38 +00:00
}
}
&-status-exception {
.@{progress-prefix-cls}-bg {
background-color: @error-color;
}
.@{progress-prefix-cls}-text {
color: @error-color;
}
.@{progress-prefix-cls}-circle-path {
stroke: @error-color;
}
}
&-status-success {
.@{progress-prefix-cls}-bg {
background-color: @success-color;
}
.@{progress-prefix-cls}-text {
color: @success-color;
}
.@{progress-prefix-cls}-circle-path {
stroke: @success-color;
}
}
&-circle &-inner {
position: relative;
line-height: 1;
background-color: transparent;
}
&-circle &-text {
position: absolute;
top: 50%;
2019-03-30 08:06:06 +00:00
left: 50%;
width: 100%;
2018-04-03 06:14:38 +00:00
margin: 0;
2019-03-30 08:06:06 +00:00
padding: 0;
2018-11-14 13:33:56 +00:00
color: @progress-text-color;
2019-03-30 08:06:06 +00:00
line-height: 1;
2018-11-14 13:33:56 +00:00
white-space: normal;
2019-03-30 08:06:06 +00:00
text-align: center;
transform: translate(-50%, -50%);
2018-04-03 06:14:38 +00:00
.@{iconfont-css-prefix} {
font-size: 14 / 12em;
}
}
&-circle&-status-exception {
.@{progress-prefix-cls}-text {
color: @error-color;
}
}
&-circle&-status-success {
.@{progress-prefix-cls}-text {
color: @success-color;
}
}
}
@keyframes ~"@{ant-prefix}-progress-active" {
0% {
width: 0;
2019-03-30 08:06:06 +00:00
opacity: 0.1;
2018-04-03 06:14:38 +00:00
}
20% {
width: 0;
2019-03-30 08:06:06 +00:00
opacity: 0.5;
2018-04-03 06:14:38 +00:00
}
100% {
width: 100%;
2019-03-30 08:06:06 +00:00
opacity: 0;
2018-04-03 06:14:38 +00:00
}
}