blairanderson
1/11/2014 - 1:16 AM

css / less up/down arrows

css / less up/down arrows

.triangle-base(@size) {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    border-left: @size solid transparent;
    border-right: @size solid transparent;
}
.triangle(@direction, @size: 7px, @color: #428bca) when (@direction = up) {
    .triangle-base(@size);
    border-bottom: @size solid @color;
}
.triangle(@direction, @size: 7px, @color: #428bca) when (@direction = down) {
    .triangle-base(@size);
    border-top: @size solid @color;
}

table{
  th > a{
    font-weight: lighter;
  }
  .current {
    text-decoration: underline;
    font-weight: bold;
  }
  .asc:after {
    .triangle(down)
  }

  .desc:after {
    .triangle(up)
  }
}