Skip to content
Snippets Groups Projects
contents.scss 2.58 KiB
Newer Older
.contents-widget {
    margin: 10px;
    .content-items {
        grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
        grid-gap: 5px;
        max-width: none;
        width: 100%;

        .content-item {

            .content-item-link {
                padding: 5px;
                grid-template-columns: 42px 135px;

                .content-item-img-wrapper {
                    margin: 0 10px 5px 5px;
                    width: 32px;
                }

                .content-item-text {
                    .content-item-title {
                        margin-bottom: 5px;
                    }

                    .content-item-description {
                        font-size: small;
                    }
                }
            }
        }
    }
}

.content-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, 270px);
    grid-gap: 15px;
    list-style: none;
    padding: 0;

    .content-item {
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
        align-items: stretch;
        background-color: var(--dark-gray-color-5);
        border: solid thin var(--light-gray-color-40);
        display: flex;
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
        justify-content: stretch;

        .content-item-link {
            color: unset;
            display: grid;
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
            flex: 1;
            grid-template-columns: 74px auto;
            grid-gap: 5px;
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
            padding: 25px 10px 10px;
            transition: 0.5s;

            .content-item-img-wrapper {
                width: 64px;
            }

            .content-item-text {
                .content-item-title {
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
                    color: var(--base-color);
                    width: 100%;
                    max-width: 160px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
            background-color: var(--white);
                .content-item-text {
                    .content-item-title {
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
                        color: var(--red);
    }
}

@media (max-width: 820px) {
    .content-items {
        grid-template-columns: 100%;

        .content-item {
            .content-item-link {
                .content-item-text {
                    .content-item-title {
                        max-width: 100%;
                    }
                }
            }
        }