lists.scss 3.2 KB
Newer Older
1 2 3 4 5
/**
 * Well styled list
 *
 */
.well-list {
P
Phil Hughes 已提交
6
  position: relative;
7
  margin: 0;
D
Dmitriy Zaporozhets 已提交
8
  padding: 0;
9
  list-style: none;
D
Dmitriy Zaporozhets 已提交
10

11
  > li {
12
    padding: 10px 15px;
13 14 15 16
    min-height: 20px;
    border-bottom: 1px solid #eee;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);

17 18 19 20 21 22
    &:after {
      content: " ";
      display: table;
      clear: both;
    }

23 24 25 26
    &.disabled {
      color: #888;
    }

27 28 29 30 31 32
    &.unstyled {
      &:hover {
        background: none;
      }
    }

33 34 35 36 37 38
    &.warning-row {
      background-color: #fcf8e3;
      border-color: #faebcc;
      color: #8a6d3b;
    }

39
    &.smoke { background-color: $background-color; }
40

41
    &:hover {
P
Phil Hughes 已提交
42
      background: $row-hover;
43
    }
44 45

    &:last-child {
D
Dmitriy Zaporozhets 已提交
46
      border-bottom: none;
47 48

      &.bottom {
49
        background: $background-color;
50
      }
51 52
    }

53 54 55 56 57 58
    .list-item-name {
      float: left;
      position: relative;
      top: 3px;
    }

59
    p {
60
      padding-top: 1px;
61
      margin: 0;
62
      color: $gray-dark;
63
      img {
64 65
        position: relative;
        top: 3px;
66 67
      }
    }
68 69

    .well-title {
70
      font-size: $list-font-size;
71 72
      line-height: 18px;
    }
73 74
  }
}
R
randx 已提交
75

76 77

/** light list with border-bottom between li **/
78
ul.bordered-list, ul.unstyled-list {
79
  @include basic-list;
80 81 82 83

  &.top-list {
    li:first-child {
      padding-top: 0;
84

85 86 87 88 89
      h4, h5 {
        margin-top: 0;
      }
    }
  }
90
}
91

92 93 94 95
ul.unstyled-list > li {
  border-bottom: none;
}

96 97 98 99 100 101 102 103
ul.task-list {
  li.task-list-item {
    list-style-type: none;
  }

  ul:not(.task-list) {
    padding-left: 1.3em;
  }
104
}
105 106 107 108 109 110 111

ul.content-list {
  @include basic-list;

  margin: 0;
  padding: 0;

112
  > li {
D
Douwe Maan 已提交
113
    border-color: $table-border-color;
114
    font-size: $list-font-size;
D
Dmitriy Zaporozhets 已提交
115
    color: $list-text-color;
116

117 118 119 120 121 122
    &.no-description {
      .title {
        line-height: $list-text-height;
      }
    }

123 124 125
    .title {
      font-weight: 600;
    }
D
Dmitriy Zaporozhets 已提交
126

D
Dmitriy Zaporozhets 已提交
127 128 129 130
    a {
      color: $gl-dark-link-color;
    }

131 132 133 134 135 136 137
    .description {
      p {
        @include str-truncated;
        margin-bottom: 0;
      }
    }

D
Dmitriy Zaporozhets 已提交
138 139 140
    .avatar {
      margin-right: 15px;
    }
D
Dmitriy Zaporozhets 已提交
141 142 143

    .controls {
      float: right;
D
Dmitriy Zaporozhets 已提交
144

145 146
      > .control-text {
        margin-right: $gl-padding-top;
147
        line-height: $list-text-height;
148 149 150 151 152 153

        &:last-child {
          margin-right: 0;
        }
      }

154 155 156 157
      > .btn,
      > .btn-group {
        margin-right: $gl-padding-top;
        display: inline-block;
158
        margin-top: 3px;
159
        margin-bottom: 4px;
160 161 162 163

        &:last-child {
          margin-right: 0;
        }
D
Dmitriy Zaporozhets 已提交
164
      }
D
Dmitriy Zaporozhets 已提交
165
    }
166 167 168 169 170 171 172 173 174 175

    // When dragging a list item
    &.ui-sortable-helper {
      border-bottom: none;
    }

    &.list-placeholder {
      background-color: $gray-light;
      border: dotted 1px $gray-dark;
      margin: 1px 0;
176
      min-height: 52px;
177
    }
178 179 180
  }
}

181 182
.panel > .content-list > li {
  padding: $gl-padding-top $gl-padding;
183 184 185 186 187 188

  &.commit {
    @media (min-width: $screen-sm-min) {
      padding-left: 46px + $gl-padding;
    }
  }
189 190
}

191 192 193 194 195 196 197 198 199 200 201
ul.controls {
  padding-top: 1px;
  float: right;
  list-style: none;

  .btn {
    padding: 10px 14px;
  }

  > li {
    float: left;
D
Douwe Maan 已提交
202
    margin-right: 10px;
203

D
Douwe Maan 已提交
204 205 206
    &:last-child {
      margin-right: 0;
    }
207 208 209 210 211 212 213 214 215 216 217

    .author_link {
      display: inline-block;

      .avatar-inline {
        margin-left: 0;
        margin-right: 0;
      }
    }
  }
}