BigW Consortium Gitlab

mixins.scss 2.77 KB
Newer Older
1 2 3 4
/**
 * Generic mixins
 */
 @mixin box-shadow($shadow) {
Koen Punt committed
5 6 7 8 9
  -webkit-box-shadow: $shadow;
  -moz-box-shadow: $shadow;
  -ms-box-shadow: $shadow;
  -o-box-shadow: $shadow;
  box-shadow: $shadow;
10 11
}

12 13
@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
14 15 16
  -moz-border-radius: $radius;
  -ms-border-radius: $radius;
  -o-border-radius: $radius;
17 18 19
  border-radius: $radius;
}

20 21 22 23
@mixin border-radius-left($radius) {
  @include border-radius($radius 0 0 $radius)
}

24 25 26 27
@mixin border-radius-right($radius) {
  @include border-radius(0 0 $radius $radius)
}

Koen Punt committed
28 29 30 31
@mixin linear-gradient($from, $to) {
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to));
  background-image: -webkit-linear-gradient($from, $to);
  background-image: -moz-linear-gradient($from, $to);
32
  background-image: -ms-linear-gradient($from, $to);
Koen Punt committed
33 34 35
  background-image: -o-linear-gradient($from, $to);
}

36 37 38 39 40 41 42 43
@mixin transition($transition) {
  -webkit-transition: $transition;
  -moz-transition: $transition;
  -ms-transition: $transition;
  -o-transition: $transition;
  transition: $transition;
}

44 45 46 47 48 49 50 51 52 53 54
/**
 * Prefilled mixins
 * Mixins with fixed values
 */

@mixin shade {
  @include box-shadow(0 0 3px #ddd);
}

@mixin solid-shade {
  @include box-shadow(0 0 0 3px #f1f1f1);
55 56
}

57
@mixin str-truncated($max_width: 82%) {
58 59 60 61 62 63 64
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
  max-width: $max_width;
}
65 66 67 68 69 70 71

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

74
  > li {
75 76 77 78 79 80 81
    padding: 10px 0;
    border-bottom: 1px solid #EEE;
    overflow: hidden;
    display: block;
    margin: 0px;

    &:last-child {
82
      border-bottom: none;
83 84 85 86 87
    }

    &.active {
      background: #f9f9f9;
      a {
88
        font-weight: 600;
89 90 91 92 93 94 95 96 97
      }
    }

    &.hide {
      display: none;
    }

    &.light {
      a {
98
        color: $gl-gray;
99 100 101 102
      }
    }
  }
}
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119

@mixin input-big {
  height: 36px;
  padding: 5px 10px;
  font-size: 16px;
  line-height: 24px;
  color: #7f8fa4;
  background-color: #fff;
  border-color: #e7e9ed;
}

@mixin btn-big {
  height: 36px;
  padding: 5px 10px;
  font-size: 16px;
  line-height: 24px;
}
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155

@mixin nav-menu {
  padding: 0;
  margin: 0;
  list-style: none;
  margin-top: 5px;
  height: 56px;

  li {
    display: inline-block;

    a {
      padding: 14px;
      font-size: 17px;
      line-height: 28px;
      color: #7f8fa4;
      border-bottom: 2px solid transparent;

      &:hover, &:active, &:focus {
        text-decoration: none;
      }
    }

    &.active a {
      color: #4c4e54;
      border-bottom: 2px solid #1cacfc;
    }

    .badge {
      font-weight: normal;
      background-color: #fff;
      background-color: #eee;
      color: #78a;
    }
  }
}
Andrey committed
156 157 158 159

.fa-align {
  top: 20px;
  position: relative;
160
}