commits.scss 3.5 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
.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;
    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;
  }
}

/*
 * 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;
  }

62
  textarea {
A
Annabel Dunstone Gray 已提交
63 64 65 66 67 68 69 70 71
    background-color: $commit-message-text-area-bg;
    font-family: inherit;
    padding-left: $left;
    position: relative;
    z-index: 2;
  }
}


72
.commits-compare-switch {
D
Dmitriy Zaporozhets 已提交
73 74 75
  float: left;
  margin-right: 9px;
}
76

P
Phil Hughes 已提交
77 78
.commit-header {
  padding: 5px 10px;
A
Annabel Dunstone Gray 已提交
79
  background-color: $gray-light;
S
Sam Rose 已提交
80
  border-bottom: 1px solid $gray-darker;
P
Phil Hughes 已提交
81 82 83 84 85
  font-size: 14px;

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

P
Phil Hughes 已提交
88 89 90 91
.commit-row-title {
  .notes_count {
    float: right;
    margin-right: 10px;
D
Dmitriy Zaporozhets 已提交
92
  }
D
Dmitriy Zaporozhets 已提交
93

P
Phil Hughes 已提交
94 95
  .str-truncated {
    max-width: 70%;
D
Dmitriy Zaporozhets 已提交
96
  }
97

P
Phil Hughes 已提交
98 99
  .commit-row-message {
    color: $gl-dark-link-color;
D
Dmitriy Zaporozhets 已提交
100
  }
101 102 103 104 105
}

.text-expander {
  display: inline-block;
  background: $gray-light;
106
  color: $gl-gray-light;
107 108 109 110 111 112 113 114 115 116
  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 已提交
117
  }
118
}
D
Dmitriy Zaporozhets 已提交
119

P
Phil Hughes 已提交
120
.commit-actions {
P
Phil Hughes 已提交
121
  @media (min-width: $screen-sm-min) {
122 123
    width: 300px;
    text-align: right;
124 125
    font-size: 0;
  }
126

A
Annabel Dunstone 已提交
127 128
  .ci-status-link {
    display: inline-block;
129 130
    position: relative;
    top: 1px;
A
Annabel Dunstone 已提交
131 132
  }

133 134
  .btn-clipboard,
  .btn-transparent {
135 136 137
    padding-left: 0;
    padding-right: 0;
  }
138

139 140 141
  .btn {
    &:not(:first-child) {
      margin-left: $gl-padding;
142
    }
P
Phil Hughes 已提交
143 144
  }
}
145

P
Phil Hughes 已提交
146 147 148 149
.commit-short-id {
  font-family: $monospace_font;
  font-weight: 600;
}
150

151 152
.commit,
.generic_commit_status {
153

P
Phil Hughes 已提交
154 155
  a,
  button {
P
Phil Hughes 已提交
156
    color: $gl-dark-link-color;
P
Phil Hughes 已提交
157
    vertical-align: baseline;
P
Phil Hughes 已提交
158
  }
159 160 161

  .commit-row-description {
    font-size: 14px;
A
Annabel Dunstone Gray 已提交
162
    border-left: 1px solid $white-normal;
163
    padding: 10px 15px;
P
Phil Hughes 已提交
164
    margin: 10px 0;
165
    background: $gray-light;
166
    display: none;
A
Annabel Dunstone 已提交
167 168
    white-space: pre-line;
    word-break: normal;
169 170 171 172 173 174

    pre {
      border: none;
      background: inherit;
      padding: 0;
      margin: 0;
175
      white-space: pre-wrap;
176
    }
P
Phil Hughes 已提交
177 178 179 180

    a {
      color: $gl-dark-link-color;
    }
181 182 183 184 185 186 187 188 189 190 191 192 193
  }

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

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

195 196
.branch-commit {
  color: $gl-gray;
197

198 199 200 201 202 203 204 205
  .commit-icon {
    text-align: center;
    display: inline-block;

    svg {
      height: 14px;
      width: 14px;
      vertical-align: middle;
206
      fill: $gl-gray-light;
207 208 209
    }
  }

D
Dimitrie Hoekstra 已提交
210
  .commit-id {
211 212 213
    color: $gl-link-color;
  }

214
  .commit-row-message {
215 216 217
    color: $gl-gray;
  }
}