commits.scss 3.48 KB
Newer Older
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 {
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 {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
73 74 75
  float: left;
  margin-right: 9px;
}
76

Phil Hughes's avatar
Phil Hughes committed
77 78
.commit-header {
  padding: 5px 10px;
79
  background-color: $gray-light;
80
  border-bottom: 1px solid $gray-darker;
Phil Hughes's avatar
Phil Hughes committed
81 82 83 84 85
  font-size: 14px;

  &:first-child {
    border-top-width: 0;
  }
86 87
}

Phil Hughes's avatar
Phil Hughes committed
88 89 90 91
.commit-row-title {
  .notes_count {
    float: right;
    margin-right: 10px;
92
  }
93

Phil Hughes's avatar
Phil Hughes committed
94 95
  .str-truncated {
    max-width: 70%;
96
  }
97

Phil Hughes's avatar
Phil Hughes committed
98 99
  .commit-row-message {
    color: $gl-dark-link-color;
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;
117
  }
118
}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
119

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

127 128
  .ci-status-link {
    display: inline-block;
129 130
    position: relative;
    top: 1px;
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
    }
Phil Hughes's avatar
Phil Hughes committed
143 144
  }
}
145

Phil Hughes's avatar
Phil Hughes committed
146 147 148 149
.commit-short-id {
  font-family: $monospace_font;
  font-weight: 600;
}
150

151 152
.commit,
.generic_commit_status {
153

154 155
  a,
  button {
Phil Hughes's avatar
Phil Hughes committed
156
    color: $gl-dark-link-color;
Phil Hughes's avatar
Phil Hughes committed
157
    vertical-align: baseline;
Phil Hughes's avatar
Phil Hughes committed
158
  }
159 160 161

  .commit-row-description {
    font-size: 14px;
162
    border-left: 1px solid $white-normal;
163
    padding: 10px 15px;
164
    margin: 10px 0;
165
    background: $gray-light;
166
    display: none;
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
    }
Phil Hughes's avatar
Phil Hughes committed
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
    }
  }

Dimitrie Hoekstra's avatar
Dimitrie Hoekstra committed
210
  .commit-id {
211 212 213
    color: $gl-link-color;
  }

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