BigW Consortium Gitlab

mixins.scss 1.59 KB
Newer Older
1 2 3 4 5
/**
 * Prefilled mixins
 * Mixins with fixed values
 */

6
@mixin str-truncated($max_width: 82%) {
7 8 9 10 11 12 13
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
  max-width: $max_width;
}
14 15 16 17 18

/*
 * Base mixin for lists in GitLab
 */
@mixin basic-list {
19 20
  margin: 5px 0;
  padding: 0;
21
  list-style: none;
22

23
  > li {
24 25
    @include clearfix;

26
    padding: 10px 0;
27
    border-bottom: 1px solid $list-border-light;
28
    display: block;
29
    margin: 0;
30 31

    &:last-child {
32
      border-bottom: none;
33 34 35
    }

    &.active {
36
      background: $gray-light;
37

38
      a {
39
        font-weight: 600;
40 41 42 43 44 45 46 47 48
      }
    }

    &.hide {
      display: none;
    }

    &.light {
      a {
49
        color: $gl-text-color;
50 51 52 53
      }
    }
  }
}
54

55 56 57 58 59 60 61 62 63 64 65 66
@mixin bulleted-list {
  > ul {
    list-style-type: disc;

    ul {
      list-style-type: circle;

      ul {
        list-style-type: square;
      }
    }
  }
67 68 69
}

@mixin dark-diff-match-line {
70 71
  color: $dark-diff-match-bg;
  background: $dark-diff-match-color;
72
}
73 74 75 76 77

@mixin webkit-prefix($property, $value) {
  #{'-webkit-' + $property}: $value;
  #{$property}: $value;
}
78

79 80 81 82 83 84 85
/* http://phrappe.com/css/conditional-css-for-webkit-based-browsers/ */
@mixin on-webkit-only {
  @media screen and (-webkit-min-device-pixel-ratio:0) {
    @content;
  }
}

86 87 88 89 90 91 92 93 94
@mixin keyframes($animation-name) {
  @-webkit-keyframes #{$animation-name} {
    @content;
  }

  @keyframes #{$animation-name} {
    @content;
  }
}
95 96 97 98 99 100 101

@mixin include-keyframes($animation-name) {
  @include webkit-prefix(animation-name, $animation-name);
  @include keyframes($animation-name) {
    @content;
  }
}