_style-icon.css 2.07 KB
.style-icon-container {
    $width: 164px;
    $height: 240px;
    $space: 15px;

    @extend .resource-container;

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

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


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

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

        .brand-text-box {
            $size: 12px;
            $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-105px/2);
            }

            * {
                display: none;
            }
        }

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

            .img {
                margin-right: 0;
            }

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

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


    }
}