@skeleton-prefix-cls: ~"@{css-prefix}skeleton";
@skeleton-item-prefix-cls: ~"@{css-prefix}skeleton-item";

.@{skeleton-item-prefix-cls} {
    background: @skeleton-base-color;
    border-radius: @border-radius-small;
    &-inline {
        display: inline-block;
    }
    &-circle {
        border-radius: 50%;
    }
    &-circle, &-square {
        &-small {
            width: @skeleton-height-small;
            height: @skeleton-height-small;
        }
        &-large {
            width: @skeleton-height-large;
            height: @skeleton-height-large;
        }
        &-default {
            width: @skeleton-height-base;
            height: @skeleton-height-base;
        }
    }
    &-rect {
        &-small {
            width: @skeleton-rect-width-small;
            height: @skeleton-height-small;
        }
        &-large {
            width: @skeleton-rect-width-large;
            height: @skeleton-height-large;
        }
        &-default {
            width: @skeleton-rect-width-base;
            height: @skeleton-height-base;
        }
    }
    &-image {
        position: relative;
        &-small {
            width: @skeleton-image-width-small;
            height: @skeleton-image-width-small;
        }
        &-large {
            width: @skeleton-image-width-large;
            height: @skeleton-image-width-large;
        }
        &-default {
            width: @skeleton-image-width-base;
            height: @skeleton-image-width-base;
        }
        &-icon {
            position: absolute;
            z-index: 1;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #ccc;
        }
    }
    &-title {
        margin-bottom: 28px;
    }
    &-avatar {
        margin-right: @skeleton-item-margin;
    }
    &-round {
        border-radius: @skeleton-border-radius-round;
    }
    &-inner {
        height: 16px;
    }
    &-animated {
        position: relative;
        overflow: hidden;
        &:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                90deg,
                @skeleton-base-color 25%,
                @skeleton-to-color 37%,
                @skeleton-base-color 63%
            );
            background-size: 400% 100%;
            animation: ivuSkeletonMove 1.4s ease infinite;
        }
    }
    @keyframes ivuSkeletonMove {
        0% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0 50%;
        }
    }
}

.@{skeleton-prefix-cls} {
    background: @white;
    .@{skeleton-item-prefix-cls} {
        margin-top: @skeleton-item-margin;
    }
    .@{skeleton-item-prefix-cls}:first-child {
        margin-top: 0;
    }
}

