Skip to content
Snippets Groups Projects
lists.scss 1.44 KiB
Newer Older
// Unordered and Ordered lists
ul,
ol {
    margin-top: 0;
    margin-bottom: 0;
    ul,
    ol {
        margin-bottom: 0;
    }
}

//comma separated
.list-csv {
    @include list-inline();
    margin-left: 0;

    > li {
        padding-left: 0;

        &::after {
            content: ",";
        }
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed
        &:last-child {
            padding-right: 0;

            &::after {
                content: unset;
            }
Jan-Hendrik Willms's avatar
Jan-Hendrik Willms committed

    &.narrow {
        > li {
            display: inline-flex;
        }
    }
.list-pipe-separated {
    @include list-inline();
    display: flex; // Prevents the mystery gap between elements

    > li {
        border-right: 1px solid var(--dark-gray-color);
        &:last-child {
            border-right: 0;
        }
    }
}

dl {
    dt {
        font-weight: bold;
    }
}

// reset the visualization of different levels of unordered lists
.formatted-content ul {
    list-style-type: disc;

    ul {
        list-style-type: circle;

        ul {
            list-style-type: square;
        }
    }
}

ul.default {
    list-style: inside;
    margin: 0;
    padding: 0;

    li:only-child {
        list-style: none;
    }
    li:not(:last-child) {
        margin-bottom: 0.25em;
    }
}

dl.default {
    display: grid;
    grid-column-gap: 1ex;
    grid-template-columns: max-content auto;
    dt {
        font-weight: normal;
        grid-column-start: 1;
    }
    dd {
        grid-column-start: 2;
    }
}