commits.scss 5.4 KB
Newer Older
A
Annabel Dunstone Gray 已提交
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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
.commit-title {
  display: block;
}

.commit-author,
.commit-committer {
  display: block;
  color: $commit-committer-color;
  font-weight: normal;
  font-style: italic;
}

.commit-author strong,
.commit-committer strong {
  font-weight: bold;
  font-style: normal;
}

.commit-description {
  background: none;
  border: none;
  margin: 0;
  padding: 0;
  margin-top: 10px;
  word-break: normal;
  white-space: pre-wrap;
}

.js-details-expand {
  &:hover {
    text-decoration: none;
  }
}

.ci-status-link {
  svg {
    overflow: visible;
  }
}

.commit-box {
  border-top: 1px solid $border-color;
  padding: $gl-padding 0;

  .commit-title {
    margin: 0;
    font-size: 23px;
    color: $gl-gray-dark;
  }

  .commit-description {
    margin-top: 15px;
  }
}

.commit-hash-full {
  @media (max-width: $screen-sm-max) {
    width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
  }
}

.file-stats {
  ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;

    li {
      padding: 3px 0;
      line-height: 20px;
    }
  }

  .new-file {
    a {
      color: $gl-text-green;
    }
  }

  .renamed-file {
    a {
      color: $gl-text-orange;
    }
  }

  .deleted-file {
    a {
      color: $gl-text-red;
    }
  }

  .edit-file {
    a {
      color: $gl-text-color;
    }
  }
}

/*
 * Commit message textarea for web editor and
 * custom merge request message
 */
.commit-message-container {
  background-color: $body-bg;
  position: relative;
  font-family: $monospace_font;
  $left: 12px;
  overflow: hidden; // See https://gitlab.com/gitlab-org/gitlab-ce/issues/13987
  .max-width-marker {
    width: 72ch;
    color: $commit-max-width-marker-color;
    font-family: inherit;
    left: $left;
    height: 100%;
    border-right: 1px solid mix($input-border, $white-light);
    position: absolute;
    z-index: 1;
  }

  > textarea {
    background-color: $commit-message-text-area-bg;
    font-family: inherit;
    padding-left: $left;
    position: relative;
    z-index: 2;
  }
}


135
.commits-compare-switch {
D
Dmitriy Zaporozhets 已提交
136 137
  @include btn-default;
  @include btn-white;
D
Dmitriy Zaporozhets 已提交
138 139 140
  float: left;
  margin-right: 9px;
}
141

P
Phil Hughes 已提交
142 143
.commit-header {
  padding: 5px 10px;
A
Annabel Dunstone Gray 已提交
144
  background-color: $gray-light;
S
Sam Rose 已提交
145
  border-bottom: 1px solid $gray-darker;
P
Phil Hughes 已提交
146 147 148 149 150
  font-size: 14px;

  &:first-child {
    border-top-width: 0;
  }
D
Dmitriy Zaporozhets 已提交
151 152
}

P
Phil Hughes 已提交
153
.commit-row-title {
154

P
Phil Hughes 已提交
155 156 157
  .notes_count {
    float: right;
    margin-right: 10px;
D
Dmitriy Zaporozhets 已提交
158
  }
D
Dmitriy Zaporozhets 已提交
159

P
Phil Hughes 已提交
160 161
  .str-truncated {
    max-width: 70%;
D
Dmitriy Zaporozhets 已提交
162
  }
163

P
Phil Hughes 已提交
164 165
  .commit-row-message {
    color: $gl-dark-link-color;
D
Dmitriy Zaporozhets 已提交
166
  }
D
Dmitriy Zaporozhets 已提交
167

168 169 170 171 172
}

.text-expander {
  display: inline-block;
  background: $gray-light;
173
  color: $gl-gray-light;
174 175 176 177 178 179 180 181 182 183
  padding: 0 5px;
  cursor: pointer;
  border: 1px solid $border-gray-dark;
  border-radius: $border-radius-default;
  margin-left: 5px;
  line-height: 1;

  &:hover {
    background-color: darken($gray-light, 10%);
    text-decoration: none;
D
Dmitriy Zaporozhets 已提交
184
  }
185
}
D
Dmitriy Zaporozhets 已提交
186

P
Phil Hughes 已提交
187
.commit-actions {
P
Phil Hughes 已提交
188
  @media (min-width: $screen-sm-min) {
189 190
    width: 300px;
    text-align: right;
191 192
    font-size: 0;
  }
193

A
Annabel Dunstone 已提交
194 195
  .ci-status-link {
    display: inline-block;
196 197
    position: relative;
    top: 1px;
A
Annabel Dunstone 已提交
198 199
  }

200 201
  .btn-clipboard,
  .btn-transparent {
202 203 204
    padding-left: 0;
    padding-right: 0;
  }
205

206 207 208
  .btn {
    &:not(:first-child) {
      margin-left: $gl-padding;
209
    }
P
Phil Hughes 已提交
210 211
  }
}
212

P
Phil Hughes 已提交
213 214 215 216
.commit-short-id {
  font-family: $monospace_font;
  font-weight: 600;
}
217

218 219
.commit,
.generic_commit_status {
P
Phil Hughes 已提交
220
  padding: 10px 0;
221
  position: relative;
222

P
Phil Hughes 已提交
223
  @media (min-width: $screen-sm-min) {
P
Phil Hughes 已提交
224
    padding-left: 46px;
P
Phil Hughes 已提交
225
  }
226

P
Phil Hughes 已提交
227 228
  a,
  button {
P
Phil Hughes 已提交
229
    color: $gl-dark-link-color;
P
Phil Hughes 已提交
230
    vertical-align: baseline;
P
Phil Hughes 已提交
231
  }
232 233 234

  .commit-row-description {
    font-size: 14px;
A
Annabel Dunstone Gray 已提交
235
    border-left: 1px solid $white-normal;
236
    padding: 10px 15px;
P
Phil Hughes 已提交
237
    margin: 10px 0;
238
    background: $gray-light;
239
    display: none;
A
Annabel Dunstone 已提交
240 241
    white-space: pre-line;
    word-break: normal;
242 243 244 245 246 247

    pre {
      border: none;
      background: inherit;
      padding: 0;
      margin: 0;
248
      white-space: pre-wrap;
249
    }
P
Phil Hughes 已提交
250 251 252 253

    a {
      color: $gl-dark-link-color;
    }
254 255 256
  }

  .commit-row-info {
257
    color: $gl-gray;
258
    line-height: 1.35;
259 260

    a {
261
      color: $gl-gray;
262 263
    }

264 265 266
    .avatar {
      margin-right: 8px;
    }
267 268 269 270 271 272 273 274 275 276 277 278 279
  }

  &.inline-commit {
    .commit-row-title {
      font-size: 13px;
    }

    .committed_ago {
      float: right;
      @extend .cgray;
    }
  }
}
280

281 282
.branch-commit {
  color: $gl-gray;
283

284 285 286 287 288 289 290 291
  .commit-icon {
    text-align: center;
    display: inline-block;

    svg {
      height: 14px;
      width: 14px;
      vertical-align: middle;
292
      fill: $gl-gray-light;
293 294 295
    }
  }

D
Dimitrie Hoekstra 已提交
296
  .commit-id {
297 298 299
    color: $gl-link-color;
  }

300
  .commit-row-message {
301 302 303
    color: $gl-gray;
  }
}
304

305 306 307
.divergence-graph {
  padding: 12px 12px 0 0;
  float: right;
308

309 310 311 312 313 314
  .graph-side {
    position: relative;
    width: 80px;
    height: 22px;
    padding: 5px 0 13px;
    float: left;
315

316 317 318
    .bar {
      position: absolute;
      height: 4px;
S
Sam Rose 已提交
319
      background-color: $divergence-graph-bar-bg;
320 321 322 323 324 325 326 327 328 329 330
    }

    .bar-behind {
      right: 0;
      border-radius: 3px 0 0 3px;
    }

    .bar-ahead {
      left: 0;
      border-radius: 0 3px 3px 0;
    }
331

332 333
    .count {
      padding-top: 6px;
334
      padding-bottom: 0;
335
      font-size: 12px;
S
Sam Rose 已提交
336
      color: $gl-title-color;
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
      display: block;
    }

    .count-behind {
      padding-right: 4px;
      text-align: right;
    }

    .count-ahead {
      padding-left: 4px;
      text-align: left;
    }
  }

  .graph-separator {
    position: relative;
    width: 1px;
    height: 18px;
    margin: 5px 0 0;
    float: left;
S
Sam Rose 已提交
357
    background-color: $divergence-graph-separator-bg;
358 359
  }
}