2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 16:17:45 +08:00
|
|
|
@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';
|
2019-11-21 20:23:56 +08:00
|
|
|
@skeleton-button-prefix-cls: ~'@{skeleton-prefix-cls}-button';
|
2019-12-19 11:56:50 +08:00
|
|
|
@skeleton-input-prefix-cls: ~'@{skeleton-prefix-cls}-input';
|
2020-06-28 22:41:59 +08:00
|
|
|
@skeleton-image-prefix-cls: ~'@{skeleton-prefix-cls}-image';
|
2018-08-22 23:34:36 +08:00
|
|
|
|
|
|
|
.@{skeleton-prefix-cls} {
|
|
|
|
display: table;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
&-header {
|
|
|
|
display: table-cell;
|
2020-03-29 10:39:46 +08:00
|
|
|
padding-right: @padding-md;
|
2019-02-15 10:48:07 +08:00
|
|
|
vertical-align: top;
|
2018-08-22 23:34:36 +08:00
|
|
|
|
2020-01-02 19:10:16 +08:00
|
|
|
// Avatar
|
2018-08-22 23:34:36 +08:00
|
|
|
.@{skeleton-avatar-prefix-cls} {
|
2019-12-03 13:33:04 +08:00
|
|
|
.skeleton-element-avatar();
|
2018-08-22 23:34:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-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%;
|
2020-04-28 11:16:01 +08:00
|
|
|
height: @skeleton-title-height;
|
2020-03-29 10:39:46 +08:00
|
|
|
margin-top: @margin-md;
|
2018-08-22 23:34:36 +08:00
|
|
|
background: @skeleton-color;
|
|
|
|
|
|
|
|
+ .@{skeleton-paragraph-prefix-cls} {
|
2020-04-28 11:16:01 +08:00
|
|
|
margin-top: @skeleton-title-paragraph-margin-top;
|
2018-08-22 23:34:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// paragraph
|
|
|
|
.@{skeleton-paragraph-prefix-cls} {
|
2019-03-15 02:30:41 +08:00
|
|
|
padding: 0;
|
2019-03-18 10:46:17 +08:00
|
|
|
|
2018-08-22 23:34:36 +08:00
|
|
|
> li {
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 100%;
|
2020-04-28 11:16:01 +08:00
|
|
|
height: @skeleton-paragraph-li-height;
|
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 {
|
2020-03-29 10:39:46 +08:00
|
|
|
margin-top: @skeleton-paragraph-li-margin-top;
|
2018-08-22 23:34:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-with-avatar &-content {
|
|
|
|
// Title
|
|
|
|
.@{skeleton-title-prefix-cls} {
|
2020-03-29 10:39:46 +08:00
|
|
|
margin-top: @margin-sm;
|
2018-08-22 23:34:36 +08:00
|
|
|
|
|
|
|
+ .@{skeleton-paragraph-prefix-cls} {
|
2020-03-29 10:39:46 +08:00
|
|
|
margin-top: @skeleton-paragraph-margin-top;
|
2018-08-22 23:34:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-16 13:19:54 +08:00
|
|
|
&-round &-content {
|
|
|
|
.@{skeleton-title-prefix-cls},
|
|
|
|
.@{skeleton-paragraph-prefix-cls} > li {
|
|
|
|
border-radius: 100px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-22 23:34:36 +08:00
|
|
|
// 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();
|
|
|
|
}
|
2019-11-21 20:23:56 +08:00
|
|
|
|
|
|
|
.@{skeleton-button-prefix-cls} {
|
|
|
|
.skeleton-color();
|
|
|
|
}
|
2019-12-19 11:56:50 +08:00
|
|
|
|
|
|
|
.@{skeleton-input-prefix-cls} {
|
|
|
|
.skeleton-color();
|
|
|
|
}
|
2020-06-28 22:41:59 +08:00
|
|
|
|
|
|
|
.@{skeleton-image-prefix-cls} {
|
|
|
|
.skeleton-color();
|
|
|
|
}
|
2019-11-21 20:23:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Skeleton element
|
|
|
|
&-element {
|
|
|
|
display: inline-block;
|
2020-06-30 13:09:04 +08:00
|
|
|
width: auto;
|
|
|
|
|
2019-11-21 20:23:56 +08:00
|
|
|
.@{skeleton-button-prefix-cls} {
|
2019-12-19 11:56:50 +08:00
|
|
|
.skeleton-element-button();
|
2019-11-21 20:23:56 +08:00
|
|
|
}
|
2019-12-03 13:33:04 +08:00
|
|
|
|
|
|
|
.@{skeleton-avatar-prefix-cls} {
|
|
|
|
.skeleton-element-avatar();
|
|
|
|
}
|
2019-12-19 11:56:50 +08:00
|
|
|
|
|
|
|
.@{skeleton-input-prefix-cls} {
|
|
|
|
.skeleton-element-input();
|
|
|
|
}
|
2020-06-28 22:41:59 +08:00
|
|
|
|
|
|
|
.@{skeleton-image-prefix-cls} {
|
|
|
|
.skeleton-element-image();
|
|
|
|
}
|
2019-12-03 13:33:04 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-19 11:56:50 +08:00
|
|
|
// Button
|
|
|
|
.skeleton-element-button() {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
|
|
|
background: @skeleton-color;
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
|
|
|
|
.skeleton-element-button-size(@btn-height-base);
|
2019-12-03 13:33:04 +08:00
|
|
|
|
2019-12-19 11:56:50 +08:00
|
|
|
&-lg {
|
|
|
|
.skeleton-element-button-size(@btn-height-lg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-sm {
|
|
|
|
.skeleton-element-button-size(@btn-height-sm);
|
|
|
|
}
|
|
|
|
}
|
2019-12-03 13:33:04 +08:00
|
|
|
// Avatar
|
|
|
|
.skeleton-element-avatar() {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
|
|
|
background: @skeleton-color;
|
|
|
|
|
|
|
|
.skeleton-element-avatar-size(@avatar-size-base);
|
|
|
|
|
|
|
|
&-lg {
|
|
|
|
.skeleton-element-avatar-size(@avatar-size-lg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-sm {
|
|
|
|
.skeleton-element-avatar-size(@avatar-size-sm);
|
2018-08-22 23:34:36 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-19 11:56:50 +08:00
|
|
|
// Input
|
|
|
|
.skeleton-element-input() {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: top;
|
|
|
|
background: @skeleton-color;
|
|
|
|
|
|
|
|
.skeleton-element-input-size(@input-height-base);
|
|
|
|
|
|
|
|
&-lg {
|
|
|
|
.skeleton-element-input-size(@input-height-lg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&-sm {
|
|
|
|
.skeleton-element-input-size(@input-height-sm);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-28 22:41:59 +08:00
|
|
|
// Image
|
|
|
|
.skeleton-element-image() {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
vertical-align: top;
|
|
|
|
background: @skeleton-color;
|
|
|
|
|
|
|
|
.skeleton-element-image-size(@image-size-base*2);
|
|
|
|
|
|
|
|
&-path {
|
|
|
|
fill: #bfbfbf;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-svg {
|
|
|
|
.skeleton-element-image-size(@image-size-base);
|
|
|
|
max-width: @image-size-base * 4;
|
|
|
|
max-height: @image-size-base * 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-21 20:23:56 +08:00
|
|
|
.skeleton-element-avatar-size(@size) {
|
2018-08-22 23:34:36 +08:00
|
|
|
width: @size;
|
2019-11-21 20:23:56 +08:00
|
|
|
.skeleton-element-common-size(@size);
|
2018-08-22 23:34:36 +08:00
|
|
|
|
|
|
|
&.@{skeleton-avatar-prefix-cls}-circle {
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-21 20:23:56 +08:00
|
|
|
.skeleton-element-button-size(@size) {
|
|
|
|
width: @size * 2;
|
|
|
|
.skeleton-element-common-size(@size);
|
|
|
|
|
|
|
|
&.@{skeleton-button-prefix-cls}-circle {
|
|
|
|
width: @size;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.@{skeleton-button-prefix-cls}-round {
|
|
|
|
border-radius: @size;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-19 11:56:50 +08:00
|
|
|
.skeleton-element-input-size(@size) {
|
|
|
|
width: 100%;
|
|
|
|
.skeleton-element-common-size(@size);
|
|
|
|
}
|
|
|
|
|
2020-06-28 22:41:59 +08:00
|
|
|
.skeleton-element-image-size(@size) {
|
|
|
|
width: @size;
|
|
|
|
.skeleton-element-common-size(@size);
|
|
|
|
|
|
|
|
&.@{skeleton-image-prefix-cls}-circle {
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-21 20:23:56 +08:00
|
|
|
.skeleton-element-common-size(@size) {
|
|
|
|
height: @size;
|
|
|
|
line-height: @size;
|
|
|
|
}
|
|
|
|
|
2018-08-22 23:34:36 +08:00
|
|
|
.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%;
|
|
|
|
}
|
|
|
|
}
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2020-03-23 10:57:37 +08:00
|
|
|
@import './rtl';
|