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

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

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


.commits-compare-switch {
  float: left;
  margin-right: 9px;
}

.commit-header {
  padding: 5px 10px;
  background-color: $gray-light;
  border-bottom: 1px solid $gray-darker;
  border-top: 1px solid $gray-darker;
  font-size: 14px;

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

.commit-row-title {
  .notes_count {
    float: right;
    margin-right: 10px;
  }

  .str-truncated {
    max-width: 70%;
  }

  .commit-row-message {
    color: $gl-text-color;
  }
}

.text-expander {
  display: inline-block;
  background: $gray-light;
  color: $gl-text-color-secondary;
  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;
  }
}

.commit.flex-list {
  display: flex;
}

.avatar-cell {
  width: 46px;
  padding-left: 10px;

  img {
    margin-right: 0;
  }
}

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

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

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

.commit-actions {
  @media (min-width: $screen-sm-min) {
    font-size: 0;
  }

  .ci-status-link {
    display: inline-block;
    position: relative;
    top: 1px;
  }

  .btn-clipboard,
  .btn-transparent {
    padding-left: 0;
    padding-right: 0;
  }

  .btn {
    &:not(:first-child) {
      margin-left: $gl-padding;
    }
  }
}

.commit-short-id {
  font-family: $monospace_font;
  font-weight: 600;
}

.commit,
.generic_commit_status {

  a,
  button {
    color: $gl-text-color;
    vertical-align: baseline;
  }

  .commit-row-description {
    font-size: 14px;
    padding: 10px 15px;
    margin: 10px 0;
    background: $gray-light;
    display: none;
    white-space: pre-line;
    word-break: normal;

    pre {
      border: none;
      background: inherit;
      padding: 0;
      margin: 0;
      white-space: pre-wrap;
    }

    a {
      color: $gl-text-color;
    }
  }

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

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

.branch-commit {
  color: $gl-text-color;

  .commit-icon {
    text-align: center;
    display: inline-block;

    svg {
      height: 14px;
      width: 14px;
      vertical-align: middle;
      fill: $gl-text-color-secondary;
    }
  }

  .commit-id {
    color: $gl-link-color;
  }

  .commit-row-message {
    color: $gl-text-color;
  }
}
