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

8 9 10
.diff-file .diff-content {
  tr.line_holder:hover > td .line_note_link {
    opacity: 1.0;
11
    filter: alpha(opacity = 100);
12 13
  }
}
14

15 16
.diff-file,
.discussion {
17
  .new-note {
18 19 20 21
    margin: 0;
    border: none;
  }
}
22

23 24
.new-note,
.note-edit-form {
25
  .note-form-actions {
26 27
    @include new-style-dropdown;

28
    position: relative;
29
    margin: $gl-padding 0 0;
30 31 32 33 34 35 36 37
  }

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

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

43
.note-textarea {
44
  display: block;
45
  padding: 10px 0;
46
  color: $gl-text-color;
47
  font-family: $regular_font;
48
  border: 0;
49 50 51 52

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

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

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

    &.is-focused {
70
      @extend .form-control:focus;
71 72 73

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

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

      .comment-toolbar,
      .nav-links {
        border-color: $gl-success;
      }
    }
88
  }
89 90
}

91 92 93 94 95 96 97 98 99 100 101 102 103
.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;
  }
}

104
.confidential-issue-warning {
105
  color: $orange-600;
106
  background-color: $orange-100;
107 108
  border-radius: $border-radius-default $border-radius-default 0 0;
  border: 1px solid $border-gray-normal;
109
  border-bottom: none;
110 111 112
  padding: 3px 12px;
  margin: auto;
  align-items: center;
113
}
114

115 116 117
.confidential-value {
  .fa {
    background-color: inherit;
118
  }
119
}
120

121 122 123 124 125 126 127 128 129 130
.confidential-warning-message {
  line-height: 1.5;
  padding: 16px;

  .confidential-warning-message-actions {
    display: flex;

    button {
      flex-grow: 1;
    }
131 132 133
  }
}

134 135 136
.confidential-issue-warning + .md-area {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
137
}
138

Phil Hughes's avatar
Phil Hughes committed
139
.discussion-form {
140
  padding: $gl-padding-top $gl-padding $gl-padding;
Annabel Dunstone's avatar
Annabel Dunstone committed
141
  background-color: $white-light;
Phil Hughes's avatar
Phil Hughes committed
142 143
}

144 145 146 147
.discussion-notes .disabled-comment {
  padding: 6px 0;
}

148 149 150 151 152 153 154 155 156 157 158 159 160 161
.notes.notes-form > li.timeline-entry {
  @include notes-media('max', $screen-sm-max) {
    padding: 0;
  }

  .timeline-content {
    @include notes-media('max', $screen-sm-max) {
      margin: 0;
    }
  }

  .timeline-entry-inner {
    border: 0;
  }
162 163
}

164 165
.note-edit-form {
  display: none;
166
  font-size: 14px;
167

168
  .md-area {
169
    background-color: $white-light;
170 171 172 173 174 175 176 177 178 179 180 181 182 183
  }
}

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

.parallel-comment {
  padding: 6px;
}

.error-alert > .alert {
  margin-top: 5px;
  margin-bottom: 5px;
184 185 186 187 188

  &.alert-dismissable {
    .close {
      color: $white-light;
      opacity: 0.85;
189
      font-weight: $gl-font-weight-normal;
190 191 192 193 194 195

      &:hover {
        opacity: 1;
      }
    }
  }
196 197 198 199 200
}

.discussion-body,
.diff-file {
  .discussion-reply-holder {
201 202
    background-color: $white-light;
    padding: 10px 16px;
203 204 205 206

    &.is-replying {
      padding-bottom: $gl-padding;
    }
207 208
  }
}
209

210 211 212 213 214 215 216 217 218 219
.discussion-with-resolve-btn {
  display: table;
  width: 100%;
  border-collapse: separate;
  table-layout: auto;

  .btn-group {
    display: table-cell;
    float: none;
    width: 1%;
220

221
    &:first-child {
222
      width: 100%;
223
      padding-right: 5px;
224 225
    }

226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
  }

  .discussion-actions {
    display: table;

    .new-issue-for-discussion path {
      fill: $gray-darkest;
    }

    .btn-group {
      display: table-cell;

      &:first-child {
        padding-right: 0;
      }

      &:first-child:not(:last-child) > div {
        border-right: 0;
      }
245
    }
246
  }
247 248 249 250

  .btn {
    width: 100%;
  }
251 252 253 254 255 256 257 258 259
}

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

.edit_note {
  .markdown-area {
    min-height: 140px;
260
    max-height: 500px;
261
  }
262

263
  .note-form-actions {
264
    background: transparent;
265 266
  }
}
267

268 269
.comment-toolbar {
  padding-top: $gl-padding-top;
270
  color: $gl-text-color-secondary;
271 272 273
  border-top: 1px solid $border-color;
}

274 275 276 277
.md-helper {
  padding-top: 10px;
}

278 279 280 281 282 283 284 285 286 287 288 289 290
.toolbar-button {
  padding: 0;
  background: none;
  border: 0;
  font-size: 14px;
  line-height: 16px;

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

291 292 293 294 295 296 297 298
  @media (min-width: $screen-md-min) {
    float: left;
    margin-right: $gl-padding;

    &:last-child {
      float: right;
      margin-right: 0;
    }
299 300 301 302 303 304 305 306 307 308 309 310 311 312
  }
}

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

.toolbar-text {
  font-size: 14px;
  line-height: 16px;
313
  margin-top: 2px;
314 315 316 317

  @media (min-width: $screen-md-min) {
    float: left;
  }
318
}
Phil Hughes's avatar
Phil Hughes committed
319 320 321 322 323 324 325 326 327 328 329 330 331

.note-form-actions {
  @media (max-width: $screen-xs-max) {
    .btn {
      float: none;
      width: 100%;

      &:not(:last-child) {
        margin-bottom: 10px;
      }
    }
  }
}
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346

.note-edit-warning.settings-message {
  display: none;
  padding: 5px 10px;
  position: absolute;
  left: 127px;
  top: 2px;

  @media (max-width: $screen-xs-max) {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 10px;
  }
}
347 348

.comment-type-dropdown {
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
349 350 351 352 353 354 355 356 357 358 359 360
  .comment-btn {
    width: auto;
  }

  .dropdown-toggle {
    float: right;

    .toggle-icon {
      color: $white-light;
      padding-right: 2px;
      margin-top: 2px;
    }
361 362 363 364 365
  }

  .dropdown-menu {
    top: initial;
    bottom: 40px;
366
    width: 298px;
367 368
  }

Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
369 370 371 372

  @media (max-width: $screen-xs-max) {
    display: flex;
    width: 100%;
373
    margin-bottom: 10px;
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
374 375 376 377 378 379 380 381 382 383 384 385 386

    .comment-btn {
      flex-grow: 1;
      flex-shrink: 0;
      width: auto;
    }

    .dropdown-toggle {
      flex-grow: 0;
      flex-shrink: 1;
      width: auto;
    }
  }
387
}
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429

.uploading-container {
  float: right;

  @media (max-width: $screen-xs-max) {
    float: left;
    margin-top: 5px;
  }
}

.uploading-error-icon,
.uploading-error-message {
  color: $gl-text-red;
}

.uploading-error-message {
  @media (max-width: $screen-xs-max) {
    &::after {
      content: "\a";
      white-space: pre;
    }
  }
}

.uploading-progress {
  margin-right: 5px;
}

.attach-new-file,
.button-attach-file,
.retry-uploading-link {
  color: $gl-link-color;
  padding: 0;
  background: none;
  border: 0;
  font-size: 14px;
  line-height: 16px;
}

.markdown-selector {
  color: $gl-link-color;
}