2018-12-07 16:17:45 +08:00
|
|
|
@import '../../style/themes/default';
|
|
|
|
@import '../../style/mixins/index';
|
2018-08-22 23:34:36 +08:00
|
|
|
|
2018-12-07 16:17:45 +08:00
|
|
|
@skeleton-prefix-cls: ~'@{ant-prefix}-skeleton';
|
|
|
|
@skeleton-avatar-prefix-cls: ~'@{skeleton-prefix-cls}-avatar';
|
|
|
|
@skeleton-title-prefix-cls: ~'@{skeleton-prefix-cls}-title';
|
|
|
|
@skeleton-paragraph-prefix-cls: ~'@{skeleton-prefix-cls}-paragraph';
|
2018-08-22 23:34:36 +08:00
|
|
|
|
|
|
|
@skeleton-to-color: shade(@skeleton-color, 5%);
|
|
|
|
|
|
|
|
.@{skeleton-prefix-cls} {
|
|
|
|
display: table;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
&-header {
|
|
|
|
display: table-cell;
|
|
|
|
padding-right: 16px;
|
2019-02-15 10:48:07 +08:00
|
|
|
vertical-align: top;
|
2018-08-22 23:34:36 +08:00
|
|
|
|
|
|
|
// Avatar
|
|
|
|
.@{skeleton-avatar-prefix-cls} {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
|
|
|
background: @skeleton-color;
|
|
|
|
|
|
|
|
.avatar-size(@avatar-size-base);
|
|
|
|
|
|
|
|
&-lg {
|
|
|
|
.avatar-size(@avatar-size-lg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-sm {
|
|
|
|
.avatar-size(@avatar-size-sm);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-content {
|
|
|
|
display: table-cell;
|
|
|
|
width: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
vertical-align: top;
|
2018-08-22 23:34:36 +08:00
|
|
|
|
|
|
|
// Title
|
|
|
|
.@{skeleton-title-prefix-cls} {
|
|
|
|
width: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
height: 16px;
|
|
|
|
margin-top: 16px;
|
2018-08-22 23:34:36 +08:00
|
|
|
background: @skeleton-color;
|
|
|
|
|
|
|
|
+ .@{skeleton-paragraph-prefix-cls} {
|
|
|
|
margin-top: 24px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// paragraph
|
|
|
|
.@{skeleton-paragraph-prefix-cls} {
|
2019-03-15 02:30:41 +08:00
|
|
|
padding: 0;
|
|
|
|
|
2018-08-22 23:34:36 +08:00
|
|
|
> li {
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 100%;
|
2018-08-22 23:34:36 +08:00
|
|
|
height: 16px;
|
2018-08-26 16:52:32 +08:00
|
|
|
list-style: none;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @skeleton-color;
|
2018-09-02 15:46:49 +08:00
|
|
|
|
2018-09-12 15:40:23 +08:00
|
|
|
&:last-child:not(:first-child):not(:nth-child(2)) {
|
|
|
|
width: 61%;
|
2018-09-02 15:46:49 +08:00
|
|
|
}
|
2018-08-22 23:34:36 +08:00
|
|
|
|
|
|
|
+ li {
|
|
|
|
margin-top: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-with-avatar &-content {
|
|
|
|
// Title
|
|
|
|
.@{skeleton-title-prefix-cls} {
|
|
|
|
margin-top: 12px;
|
|
|
|
|
|
|
|
+ .@{skeleton-paragraph-prefix-cls} {
|
|
|
|
margin-top: 28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// With active animation
|
|
|
|
&.@{skeleton-prefix-cls}-active {
|
|
|
|
& .@{skeleton-prefix-cls}-content {
|
|
|
|
.@{skeleton-title-prefix-cls},
|
|
|
|
.@{skeleton-paragraph-prefix-cls} > li {
|
|
|
|
.skeleton-color();
|
|
|
|
}
|
|
|
|
}
|
2018-09-02 15:48:52 +08:00
|
|
|
|
|
|
|
.@{skeleton-avatar-prefix-cls} {
|
|
|
|
.skeleton-color();
|
|
|
|
}
|
2018-08-22 23:34:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-size(@size) {
|
|
|
|
width: @size;
|
|
|
|
height: @size;
|
|
|
|
line-height: @size;
|
|
|
|
|
|
|
|
&.@{skeleton-avatar-prefix-cls}-circle {
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.skeleton-color() {
|
2018-12-07 16:17:45 +08:00
|
|
|
background: linear-gradient(
|
|
|
|
90deg,
|
|
|
|
@skeleton-color 25%,
|
|
|
|
@skeleton-to-color 37%,
|
|
|
|
@skeleton-color 63%
|
|
|
|
);
|
2018-08-22 23:34:36 +08:00
|
|
|
background-size: 400% 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
animation: ~'@{skeleton-prefix-cls}-loading' 1.4s ease infinite;
|
2018-08-22 23:34:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes ~"@{skeleton-prefix-cls}-loading" {
|
|
|
|
0% {
|
|
|
|
background-position: 100% 50%;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
background-position: 0 50%;
|
|
|
|
}
|
|
|
|
}
|