@charset 'utf-8';

/*  ========================================================================
    JUICE -> ELEMENTS -> TYPOGRAPHY -> LIST
    ========================================================================  */

// Check if the elements with list should be imported
@if $import-elements and $import-element-list {
    ul,
    ol {

        // Styles
        font-size: $list-font-size;
        margin: 0;
        margin-bottom: $list-element-spacing;
        margin-left: $list-indent-spacing;

        // Check if the list size modifiers should be declared
        @if $list-size-modifiers {
            // Cycle through all of the sizes
            @each $size in $sizes {
                // Modifiers: Sizes
                &.is-#{$size} {
                    font-size: map-get($list-font-size-sizes, $size);
                }

                // Check if the list size modifiers with breakpoints should be declared
                @if $list-size-modifiers-with-breakpoints {
                    // Cycle through all of the breakpoints
                    @each $breakpoint-name, $breakpoint-value in $breakpoints {
                        // Breakpoint
                        @include breakpoint($breakpoint-name) {
                            // Modifiers: Size
                            &.is-#{$size}\@#{$breakpoint-name} {
                                font-size: map-get($list-font-size-sizes, $size);
                            }
                        }
                    }
                }
            }
        }

        // Check if the list style type modifiers should be declared
        @if $list-style-type-modifiers {
            // Cycle through all of the list style types
            @each $list-style-type in $list-style-types {
                // Modifiers
                &.list--#{$list-style-type} {
                    // Styles
                    list-style-type: $list-style-type;
                }
            }
        }

        // Check if the list clear modifier should be declared
        @if $list-clear-modifier {
            // Modifiers
            &.list--clear {
                // Styles
                list-style: none;
                margin-left: 0;
                margin-right: 0;
                margin-top: 0;
                padding: 0;
            }
        }
    }
}
