lists.scss 5.55 KB
Newer Older
1 2 3 4 5
/**
 * Well styled list
 *
 */
.well-list {
Phil Hughes's avatar
Phil Hughes committed
6
  position: relative;
7
  margin: 0;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8
  padding: 0;
9
  list-style: none;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
10

11
  > li {
12
    padding: 10px 15px;
13
    min-height: 20px;
14
    border-bottom: 1px solid $list-border;
15

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

22
    &.disabled {
23
      color: $list-text-disabled-color;
24 25
    }

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

32
    &.warning-row {
33 34 35
      background-color: $list-warning-row-bg;
      border-color: $list-warning-row-border;
      color: $list-warning-row-color;
36 37
    }

38
    &.smoke { background-color: $gray-light; }
39

40
    &:not(.ui-sort-disabled):hover {
41
      background: $row-hover;
42
    }
43 44

    &:last-child {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
45
      border-bottom: none;
46 47

      &.bottom {
48
        background: $gray-light;
49
      }
50 51
    }

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

58
    p {
59
      padding-top: 1px;
60
      margin: 0;
61
      color: $white-normal;
62

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
  }
}
randx's avatar
randx committed
75

76 77

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

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

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

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

Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
98
// Generic content list
99 100 101 102 103
ul.content-list {
  @include basic-list;
  margin: 0;
  padding: 0;

Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
104
  li {
105
    border-color: $white-normal;
106
    font-size: $list-font-size;
107
    color: $list-text-color;
108

109 110 111 112 113 114
    &.no-description {
      .title {
        line-height: $list-text-height;
      }
    }

115 116 117
    .title {
      font-weight: 600;
    }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
118

119
    a {
120
      color: $gl-text-color;
121 122
    }

Phil Hughes's avatar
Phil Hughes committed
123
    .member-group-link {
124
      color: $blue-600;
Phil Hughes's avatar
Phil Hughes committed
125 126
    }

127 128 129 130 131 132 133
    .description {
      p {
        @include str-truncated;
        margin-bottom: 0;
      }
    }

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
134 135
    .controls {
      float: right;
136

137 138
      > .control-text {
        margin-right: $gl-padding-top;
139
        line-height: $list-text-height;
140 141 142 143 144 145

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

146
      > .btn,
147 148
      > .btn-group,
      > .dropdown.inline {
149 150
        margin-right: $gl-padding-top;
        display: inline-block;
151
        margin-top: 3px;
152
        margin-bottom: 4px;
153

154
        &.has-tooltip,
155 156
        &:last-child {
          margin-right: 0;
157 158 159 160

          @media(max-width: $screen-xs-max) {
            margin: 0 auto;
          }
161
        }
162
      }
Luke Bennett's avatar
Luke Bennett committed
163 164

      .no-comments {
165
        opacity: .5;
Luke Bennett's avatar
Luke Bennett committed
166
      }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
167
    }
168

169 170
    .member-controls {
      float: none;
Phil Hughes's avatar
Phil Hughes committed
171 172

      @media (min-width: $screen-sm-min) {
173 174 175 176
        float: right;
      }
    }

177 178 179 180 181 182 183
    // When dragging a list item
    &.ui-sortable-helper {
      border-bottom: none;
    }

    &.list-placeholder {
      background-color: $gray-light;
184
      border: dotted 1px $white-normal;
185
      margin: 1px 0;
186
      min-height: 52px;
187
    }
188 189 190
  }
}

Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
191 192 193 194 195 196
// Content list using flexbox
.flex-list {
  .flex-row {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
197
    align-items: center;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
198 199 200 201 202 203 204 205 206
    white-space: nowrap;
  }

  .row-main-content {
    flex: 1 1 auto;
    overflow: hidden;
    padding-right: 8px;
  }

207 208 209 210 211
  .row-fixed-content {
    flex: 0 0 auto;
    margin-left: auto;
  }

Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
  .row-title {
    font-weight: 600;
  }

  .row-second-line {
    display: block;
  }

  .dropdown {
    .btn-block {
      margin-bottom: 0;
      line-height: inherit;
    }
  }

  .label-default {
228
    color: $gl-text-color-secondary;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
229 230 231
  }
}

232 233 234 235
.panel > .content-list > li {
  padding: $gl-padding-top $gl-padding;
}

236 237 238 239 240 241 242 243 244 245
ul.controls {
  float: right;
  list-style: none;

  .btn {
    padding: 10px 14px;
  }

  > li {
    float: left;
246
    margin-right: 10px;
247

248 249 250
    &:last-child {
      margin-right: 0;
    }
251 252 253 254 255 256 257

    .author_link {
      display: inline-block;

      .avatar-inline {
        margin-left: 0;
        margin-right: 0;
258
        margin-bottom: 0;
259 260 261 262
      }
    }
  }
}
263 264 265 266

ul.indent-list {
  padding: 10px 0 0 30px;
}
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293


// Specific styles for tree list
.group-list-tree {
  .folder-toggle-wrap {
    float: left;
    line-height: $list-text-height;
    font-size: 0;

    span {
      font-size: $gl-font-size;
    }
  }

  .folder-caret,
  .folder-icon {
    display: inline-block;
  }

  .folder-caret {
    width: 15px;
  }

  .folder-icon {
    width: 20px;
  }

294
  > .group-row:not(.has-subgroups) {
295 296 297 298 299 300 301 302 303 304 305 306
    .folder-caret .fa {
      opacity: 0;
    }
  }

  .content-list li:last-child {
    padding-bottom: 0;
  }

  .group-list-tree {
    margin-bottom: 0;
    margin-left: 20px;
307 308
    position: relative;

309
    &::before {
310 311 312 313
      content: '';
      display: block;
      width: 0;
      position: absolute;
314
      top: 5px;
315 316 317 318 319 320 321
      bottom: 0;
      left: -16px;
      border-left: 2px solid $border-white-normal;
    }

    .group-row {
      position: relative;
322 323

      &::before {
324 325 326 327 328 329 330 331 332 333
        content: "";
        display: block;
        width: 10px;
        height: 0;
        border-top: 2px solid $border-white-normal;
        position: absolute;
        top: 30px;
        left: -16px;
      }

334 335
      &:last-child::before {
        background: $white-light;
336 337 338 339 340 341
        height: auto;
        top: 30px;
        bottom: 0;
      }
    }
  }
Alfredo Sumaran's avatar
Alfredo Sumaran committed
342

343 344 345 346 347 348
  .group-row {
    padding: 0;
    border: none;
  }

  .group-row-contents {
Alfredo Sumaran's avatar
Alfredo Sumaran committed
349
    padding: 10px 10px 8px;
350 351 352
    border-top: solid 1px transparent;
    border-bottom: solid 1px $white-normal;

Alfredo Sumaran's avatar
Alfredo Sumaran committed
353
    &:hover {
354 355
      border-color: $row-hover-border;
      background-color: $row-hover;
Alfredo Sumaran's avatar
Alfredo Sumaran committed
356
      cursor: pointer;
357 358
    }
  }
359
}
Alfredo Sumaran's avatar
Alfredo Sumaran committed
360 361 362 363 364 365 366

.js-groups-list-holder {
  .groups-list-loading {
    font-size: 34px;
    text-align: center;
  }
}