commits.scss 4.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
.commit-description {
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
  word-break: normal;
  white-space: pre-wrap;
}

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

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

  .commit-title {
    margin: 0;
T
tauriedavis 已提交
22
    color: $gl-text-color;
A
Annabel Dunstone Gray 已提交
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
  }

  .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;
  }
}

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
.pipeline-info {
  .status-icon-container {
    display: inline-block;
    vertical-align: middle;
    margin-right: 3px;

    svg {
      display: block;
      width: 22px;
      height: 22px;
    }
  }

  .mr-widget-pipeline-graph {
    display: inline-block;
    vertical-align: middle;
57 58 59 60 61
    margin-right: 4px;

    .stage-cell .stage-container {
      margin: 3px 3px 3px 0;
    }
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76

    .dropdown-menu {
      margin-top: 11px;
    }
  }
}

.branch-info .commit-icon {
  margin-right: 3px;

  svg {
    top: 3px;
  }
}

A
Annabel Dunstone Gray 已提交
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
/*
 * 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;
  }

98
  textarea {
A
Annabel Dunstone Gray 已提交
99 100 101 102 103 104 105 106 107
    background-color: $commit-message-text-area-bg;
    font-family: inherit;
    padding-left: $left;
    position: relative;
    z-index: 2;
  }
}


108
.commits-compare-switch {
D
Dmitriy Zaporozhets 已提交
109 110 111
  float: left;
  margin-right: 9px;
}
112

P
Phil Hughes 已提交
113 114
.commit-header {
  padding: 5px 10px;
A
Annabel Dunstone Gray 已提交
115
  background-color: $gray-light;
S
Sam Rose 已提交
116
  border-bottom: 1px solid $gray-darker;
S
Simon Knox 已提交
117
  border-top: 1px solid $gray-darker;
P
Phil Hughes 已提交
118 119 120 121 122
  font-size: 14px;

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

P
Phil Hughes 已提交
125 126 127 128
.commit-row-title {
  .notes_count {
    float: right;
    margin-right: 10px;
D
Dmitriy Zaporozhets 已提交
129
  }
D
Dmitriy Zaporozhets 已提交
130

P
Phil Hughes 已提交
131 132
  .str-truncated {
    max-width: 70%;
D
Dmitriy Zaporozhets 已提交
133
  }
134

P
Phil Hughes 已提交
135
  .commit-row-message {
T
tauriedavis 已提交
136
    color: $gl-text-color;
D
Dmitriy Zaporozhets 已提交
137
  }
138 139 140 141
}

.text-expander {
  display: inline-block;
142
  background: $white-light;
T
tauriedavis 已提交
143
  color: $gl-text-color-secondary;
144 145 146 147 148
  padding: 0 5px;
  cursor: pointer;
  border: 1px solid $border-gray-dark;
  border-radius: $border-radius-default;
  margin-left: 5px;
149 150 151
  font-size: $gl-font-size;
  line-height: $gl-font-size;
  outline: none;
152

153 154 155 156 157
  &.open {
    background: $gray-light;
    box-shadow: inset 0 0 2px rgba($black, 0.2);
  }

158 159 160
  &:hover {
    background-color: darken($gray-light, 10%);
    text-decoration: none;
D
Dmitriy Zaporozhets 已提交
161
  }
162
}
D
Dmitriy Zaporozhets 已提交
163

S
Simon Knox 已提交
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190
.commit.flex-list {
  display: flex;
}

.avatar-cell {
  width: 46px;

  img {
    margin-right: 0;
  }
}

.commit-detail {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-grow: 1;

  .merge-request-branches & {
    flex-direction: column;
  }
}

.commit-content {
  padding-right: 10px;
}

P
Phil Hughes 已提交
191
.commit-actions {
P
Phil Hughes 已提交
192
  @media (min-width: $screen-sm-min) {
193 194
    font-size: 0;
  }
195

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

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

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

214 215 216 217
  .commit-sha {
    font-size: 14px;
    font-weight: 600;
  }
P
Phil Hughes 已提交
218
}
219

220 221
.commit,
.generic_commit_status {
222

P
Phil Hughes 已提交
223 224
  a,
  button {
T
tauriedavis 已提交
225
    color: $gl-text-color;
P
Phil Hughes 已提交
226
    vertical-align: baseline;
P
Phil Hughes 已提交
227
  }
228 229 230 231

  .commit-row-description {
    font-size: 14px;
    padding: 10px 15px;
P
Phil Hughes 已提交
232
    margin: 10px 0;
233
    background: $gray-light;
234
    display: none;
235
    white-space: pre-wrap;
A
Annabel Dunstone 已提交
236
    word-break: normal;
237 238 239 240 241 242

    pre {
      border: none;
      background: inherit;
      padding: 0;
      margin: 0;
243
      white-space: pre-wrap;
244
    }
P
Phil Hughes 已提交
245 246

    a {
T
tauriedavis 已提交
247
      color: $gl-text-color;
P
Phil Hughes 已提交
248
    }
249 250 251 252 253 254 255 256 257
  }

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

    .committed_ago {
      @extend .cgray;
258
      float: right;
259 260 261
    }
  }
}
262

263
.branch-commit {
T
tauriedavis 已提交
264
  color: $gl-text-color;
265

266 267 268 269 270 271 272 273
  .commit-icon {
    text-align: center;
    display: inline-block;

    svg {
      height: 14px;
      width: 14px;
      vertical-align: middle;
T
tauriedavis 已提交
274
      fill: $gl-text-color-secondary;
275 276 277
    }
  }

278
  .commit-sha {
279 280 281
    color: $gl-link-color;
  }

282
  .commit-row-message {
T
tauriedavis 已提交
283
    color: $gl-text-color;
284 285
  }
}