<div class="filter ">
    <h3 class="filter__title">
        Kleur
    </h3>

    <div class="filter__content">
        <div class="filter__list filter__list--swatches">
            <div class="filter__color-item">
                <a href='#' class="filter__color-option filter__color-option--active">
                    <div class="filter__color-sample" style="background: #000"></div>
                </a>
            </div>
            <div class="filter__color-item">
                <a href='#' class="filter__color-option filter__color-option">
                    <div class="filter__color-sample" style="background: red"></div>
                </a>
            </div>
            <div class="filter__color-item">
                <a href='#' class="filter__color-option filter__color-option">
                    <div class="filter__color-sample" style="background: #5cb85c"></div>
                </a>
            </div>
            <div class="filter__color-item">
                <a href='#' class="filter__color-option filter__color-option">
                    <div class="filter__color-sample" style="background: #0275d8"></div>
                </a>
            </div>
            <div class="filter__color-item">
                <a href='#' class="filter__color-option filter__color-option">
                    <div class="filter__color-sample" style="background: #f1a83b"></div>
                </a>
            </div>
            <div class="filter__color-item">
                <a href='#' class="filter__color-option filter__color-option">
                    <div class="filter__color-sample" style="background: #ff5e98"></div>
                </a>
            </div>
            <div class="filter__color-item">
                <a href='#' class="filter__color-option filter__color-option">
                    <div class="filter__color-sample" style="background: #8f27b4"></div>
                </a>
            </div>
        </div>
    </div>
</div>
<div class="filter {{ class }}">
    {{ render '@heading' title }}
    <div class="filter__content">
        <div class="filter__list filter__list--swatches">
            {{#each options }}
                <div class="filter__color-item">
                    <a
                            href='{{ href }}'
                            class="filter__color-option {{ class }}"
                    >
                        <div
                                class="filter__color-sample"
                            {{{ attributes }}}
                        ></div>
                    </a>
                </div>
            {{/each }}
        </div>
    </div>
</div>
{
  "icon": {
    "id": "angle-down",
    "title": "Arrow down",
    "class": "dropdown-list__icon"
  },
  "id": "color",
  "title": {
    "class": "filter__title",
    "tag": "h3",
    "text": "Kleur"
  },
  "options": [
    {
      "href": "#",
      "class": "filter__color-option--active",
      "attributes": "style=\"background: #000\"",
      "label": "Black"
    },
    {
      "href": "#",
      "class": "filter__color-option",
      "attributes": "style=\"background: red\"",
      "label": "Red"
    },
    {
      "href": "#",
      "class": "filter__color-option",
      "attributes": "style=\"background: #5cb85c\"",
      "label": "Green"
    },
    {
      "href": "#",
      "class": "filter__color-option",
      "attributes": "style=\"background: #0275d8\"",
      "label": "Blue"
    },
    {
      "href": "#",
      "class": "filter__color-option",
      "attributes": "style=\"background: #f1a83b\"",
      "label": "Yellow"
    },
    {
      "href": "#",
      "class": "filter__color-option",
      "attributes": "style=\"background: #ff5e98\"",
      "label": "Pink"
    },
    {
      "href": "#",
      "class": "filter__color-option",
      "attributes": "style=\"background: #8f27b4\"",
      "label": "Purple"
    }
  ]
}
  • Content:
    .filter {
        margin: $spacer 0;
    
        &__title {
            font-family: $font-family-saira;
            font-weight: 500;
            font-size: $font-size-base;
            color: #808080;
    
            margin: 0 0 $spacer 0;
            transition: $transition-base;
            line-height: 165%;
    
            display: flex;
            justify-content: flex-start;
        }
    
        &__category-list {
            margin: 0 0 $spacer 0;
    
            &--nested {
                margin: 0 0 0 $spacer--large;
            }
    
            &--nested-second-level {
                margin: 0 0 0 #{$spacer--large * 2};
            }
        }
    
        &__category-item {
            padding: 0;
        }
    
        &__category-link {
            display: block;
            padding: 14px 0;
            color: $color-secondary;
    
            &:hover,
            &:focus {
                text-decoration: underline;
            }
        }
    
        &__list {
            display: flex;
            flex-wrap: wrap;
            flex-direction: row;
    
            &--swatches {
                flex-direction: row;
            }
    
            &--select {
                flex-direction: row;
                width: 100%;
    
                & .label {
                    display: none;
                }
    
                & .select__field {
                    color: rgba(0, 0, 0, 0.3);
                }
            }
        }
    
        &__swatch-item {
            margin: 0 $spacer $spacer--medium $spacer;
    
            @include mq($screen-l) {
                display: flex;
                justify-content: center;
                flex-basis: 20%;
                margin: 0 0 $spacer--medium 0;
            }
        }
    
        &__swatch-option {
            display: flex;
            justify-content: center;
            align-items: center;
            min-width: 48px;
            min-height: 48px;
            border: 3px solid $white;
            background-color: $white;
            color: $gray-dark;
            transition: $transition-base;
            cursor: pointer;
            text-decoration: none;
    
            &:hover,
            &:focus {
                text-decoration: none;
                border-color: $color-primary;
            }
    
            &--active {
                border-color: $color-primary;
            }
        }
    
        &__color-item {
            margin: 0 $spacer;
    
            @include mq($screen-l) {
                display: flex;
                justify-content: center;
                flex-basis: 20%;
                margin: 0 0 $spacer 0;
            }
        }
    
        &__color-option {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            max-width: 42px;
            width: 42px;
            height: 42px;
            max-height: 42px;
            text-decoration: none;
    
            &:after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 42px;
                height: 42px;
                background-color: transparent;
                border: 2px solid transparent;
                border-radius: 0;
                transition: $transition-base;
            }
    
            &--active,
            &:hover,
            &:focus {
                text-decoration: none;
    
                &:after {
                    border-color: $color-primary;
                }
            }
        }
    
        &__color-sample {
            width: 34px;
            height: 34px;
            border-radius: 3px;
            box-shadow: inset 0 0 3px #e5e5e5;
        }
    
        &__range {
            margin: 0 0 $spacer--medium 0;
        }
    
        & .range-filter {
            &__button {
                display: none;
            }
        }
        & .actions {
            & .action {
                cursor: pointer;
            }
        }
    }
    
  • URL: /components/raw/filter/_filter.scss
  • Filesystem Path: build/components/03-modules/filter/_filter.scss
  • Size: 3.5 KB

There are no notes for this item.