summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/framework/mixins.scss
blob: 396a37bab6e00896972a04e38d18dd0a64d85d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/**
 * Generic mixins
 */
@mixin box-shadow($shadow) {
  box-shadow: $shadow;
}

@mixin border-radius($radius) {
  border-radius: $radius;
}

@mixin transition($transition) {
  -webkit-transition: $transition;
  -moz-transition: $transition;
  -ms-transition: $transition;
  -o-transition: $transition;
  transition: $transition;
}

/**
 * Prefilled mixins
 * Mixins with fixed values
 */

@mixin str-truncated($max_width: 82%) {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
  max-width: $max_width;
}

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

  > li {
    @include clearfix;

    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: block;
    margin: 0;

    &:last-child {
      border-bottom: none;
    }

    &.active {
      background: #f9f9f9;
      a {
        font-weight: 600;
      }
    }

    &.hide {
      display: none;
    }

    &.light {
      a {
        color: $gl-gray;
      }
    }
  }
}

@mixin bulleted-list {
  > ul {
    list-style-type: disc;

    ul {
      list-style-type: circle;

      ul {
        list-style-type: square;
      }
    }
  }
}

@mixin dark-diff-match-line {
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

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