_style-icon.css 2.03 KB
.style-icon-container {
    $width: 221px;
    $height: 320px;
    $space: 15px;
    $buttonWidth: 140px;

    @extend .resource-container;

    .smooth-card-container {
        width: 1170px;
        height: $height;
        margin: 0 auto;
        overflow: hidden;
    }

    .card {
        height: $height;
        float: left;
        position: relative;
        box-sizing: border-box;

        .img {
            width: $width;
            height: 100%;
            float: left;
            margin-right: $space;
            background-size: 100% 100%;
            background-position: center center;
        }

        &.last {
            .img {
                margin-right: 0;
            }
        }

        .brand-text-box {
            $size: 16px;
            $line-height: 1.2;
            $lines-to-show: 3;

            width: 0;
            border: none;

            p {
                height: calc($size*$line-height*$lines-to-show);
                width: calc($width-2*$space);
                padding-right: $space;
                font-size: $size;
                line-height: $line-height;
                overflow: hidden;
                -webkit-line-clamp: $lines-to-show;
                -webkit-box-orient: vertical;
                color: #505050;
            }

            button {
                left: calc($width/2-$buttonWidth/2); /* stylelint-disable-line */
            }

            * {
                display: none;
            }
        }

        &.active {
            width: calc($width*2+$space);
            float: left;

            .img {
                margin-right: 0;
            }

            .brand-text-box {
                width: $width;
                height: 100%;
                float: left;
                padding: 25px 0 25px $space;
                border: 1px solid #404040;
                border-left: none;

                * {
                    display: block;
                }
                p {
                    display: -webkit-box;
                }
            }
        }

    }
}