note_form.scss 3.45 KB
Newer Older
1 2 3
/**
 * Note Form
 */
4 5 6 7
.comment-btn {
  @extend .btn-create;
}

8 9 10 11 12 13 14 15
.diff-file .diff-content {
  tr.line_holder:hover > td .line_note_link {
    opacity: 1.0;
    filter: alpha(opacity=100);
  }
}
.diff-file,
.discussion {
16
  .new-note {
17 18 19 20
    margin: 0;
    border: none;
  }
}
21 22

.new-note {
23 24 25
  display: none;
}

26
.new-note, .note-edit-form {
27 28
  .note-form-actions {
    margin-top: $gl-padding;
29 30 31 32 33 34 35 36
  }

  .note-preview-holder {
    > p {
      overflow-x: auto;
    }
  }

37 38 39
  img {
    max-width: 100%;
  }
40 41
}

42
.note-textarea {
43
  display: block;
Phil Hughes's avatar
Phil Hughes committed
44
  padding: 10px 0;
45
  color: $gl-gray;
46
  font-family: $regular_font;
47
  border: 0;
48 49 50 51

  &:focus {
    outline: 0;
  }
52 53 54 55 56 57 58 59 60
}

.note-image-attach {
  @extend .col-md-4;
  margin-left: 45px;
  float: none;
}

.common-note-form {
61 62
  .md-area {
    padding: $gl-padding-top $gl-padding;
Phil Hughes's avatar
Phil Hughes committed
63
    border: 1px solid $note-form-border-color;
64
    border-radius: $border-radius-base;
65 66
    transition: border-color ease-in-out 0.15s,
                box-shadow ease-in-out 0.15s;
Phil Hughes's avatar
Phil Hughes committed
67 68

    &.is-focused {
69
      @extend .form-control:focus;
Phil Hughes's avatar
Phil Hughes committed
70 71 72

      .comment-toolbar,
      .nav-links {
Phil Hughes's avatar
Phil Hughes committed
73
        border-color: $focus-border-color;
Phil Hughes's avatar
Phil Hughes committed
74 75
      }
    }
Annabel Dunstone's avatar
Annabel Dunstone committed
76

77 78
    &.is-dropzone-hover {
      border-color: $gl-success;
Phil Hughes's avatar
Phil Hughes committed
79
      box-shadow: 0 0 2px $black-transparent,
Phil Hughes's avatar
Phil Hughes committed
80
                  0 0 4px $gl-success-focus;
81 82 83 84 85 86

      .comment-toolbar,
      .nav-links {
        border-color: $gl-success;
      }
    }
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
.md-header .nav-links {
  display: flex;
  display: -webkit-flex;
  flex-flow: row wrap;
  -webkit-flex-flow: row wrap;
  width: 100%;

  .pull-right {
    // Flexbox quirk to make sure right-aligned items stay right-aligned.
    margin-left: auto;
  }
}

.confidential-issue-warning {
  background-color: $gray-normal;
  border-radius: 3px;
  padding: 3px 12px;
  margin: auto;
  margin-top: 0;
  text-align: center;
  font-size: 13px;

  @media (max-width: $screen-md-min) {
    // On smaller devices the warning becomes the fourth item in the list,
    // rather than centering, and grows to span the full width of the
    // comment area.
    order: 4;
    -webkit-order: 4;
    margin: 6px auto;
    width: 100%;
  }
}

Phil Hughes's avatar
Phil Hughes committed
123 124
.discussion-form {
  padding: $gl-padding-top $gl-padding;
Annabel Dunstone's avatar
Annabel Dunstone committed
125
  background-color: $white-light;
Phil Hughes's avatar
Phil Hughes committed
126 127
}

128 129
.note-edit-form {
  display: none;
130
  font-size: 15px;
131

132 133
  .md-area {
    background-color: #fff;
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
  }
}

.js-note-attachment-delete {
  display: none;
}

.parallel-comment {
  padding: 6px;
}

.error-alert > .alert {
  margin-top: 5px;
  margin-bottom: 5px;
}

.discussion-body,
.diff-file {
  .notes .note {
    padding: 10px 15px;
  }

  .discussion-reply-holder {
157 158
    background-color: $white-light;
    padding: 10px 16px;
159 160 161 162 163 164 165 166 167 168
  }
}

.discussion-notes-count {
  font-size: 16px;
}

.edit_note {
  .markdown-area {
    min-height: 140px;
169
    max-height: 500px;
170 171
  }
  .note-form-actions {
172
    background: transparent;
173 174
  }
}
175

176 177
.comment-toolbar {
  padding-top: $gl-padding-top;
Phil Hughes's avatar
Phil Hughes committed
178
  color: $note-toolbar-color;
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
  border-top: 1px solid $border-color;
}

.toolbar-button {
  padding: 0;
  background: none;
  border: 0;
  font-size: 14px;
  line-height: 16px;

  &:hover,
  &:focus {
    color: $gl-link-color;
    outline: 0;
  }

Phil Hughes's avatar
Phil Hughes committed
195 196 197 198 199 200 201 202
  @media (min-width: $screen-md-min) {
    float: left;
    margin-right: $gl-padding;

    &:last-child {
      float: right;
      margin-right: 0;
    }
203 204 205 206 207 208 209 210 211 212 213 214 215 216
  }
}

.toolbar-button-icon {
  position: relative;
  top: 1px;
  margin-right: 3px;
  color: inherit;
  font-size: 16px;
}

.toolbar-text {
  font-size: 14px;
  line-height: 16px;
Phil Hughes's avatar
Phil Hughes committed
217 218 219 220

  @media (min-width: $screen-md-min) {
    float: left;
  }
221
}