$color-list: $color-white !default;
$color-list-hover: $color-gray-light !default;

@mixin list() {

  list-style-type: none;
  margin: 0;
  padding: 0;

  @include clearfix();

  > li {
    display: block;

    > a {
      display: block;
      padding: $padding-vertical $padding-horizontal / 2;
    }
  }
}

@mixin reset-definition-list() {
  margin: 0;
  dd {
    margin: 0;
  }
}

@mixin horizontal-definition-list() {
  @include reset-definition-list();
  > dt {
    text-align: left;
    float: left;
    clear: left;
  }

  > dd {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@mixin list-horizontal($direction: ltr) {

  @include list();

  @if $direction == ltr {
    > li {
      float: left;
      &:last-child > a {
        padding-right: 0;
      }
      &:first-child > a {
        padding-left: 0;
      }
    }
  } @else {
    > li {
      float: right;
      &:first-child > a {
        padding-right: 0;
      }
      &:last-child > a {
        padding-left: 0;
      }
    }

  }

}

@mixin tree-item($indentation: $padding-horizontal) {
  padding-top: 0;
  padding-left: $indentation + $padding-horizontal;
  position: relative;
  &:after {
    content: "";
    width: $padding-horizontal / 2;
    border-top: 1px dashed $color-text;
    position: absolute;
    left: $indentation;
    top: $line-height-base / 2;
  }
  &:before {
    content: "";
    border-left: 1px dashed $color-text;
    position: absolute;
    left: $indentation;
    top: 0;
    height: $line-height-base + $padding-vertical;
  }
}

@mixin list-tree($indentation: $padding-horizontal) {
  @include list();

  > li > a {
    padding-top: 0;
    padding-left: 0;
  }

  ul > li {
    &:last-child > a:before {
      height: $padding-vertical;
    }

    > a {
      @include tree-item($indentation: $indentation);
    }
  }
}

