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

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

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

23 24
.new-note,
.note-edit-form {
25
  .note-form-actions {
26
    position: relative;
27
    margin: $gl-padding 0 0;
28 29 30 31 32 33 34 35
  }

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

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

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

  &:focus {
    outline: 0;
  }
51 52 53
}

.note-image-attach {
Clement Ho's avatar
Clement Ho committed
54
  @extend .col-lg-4;
55 56 57 58 59
  margin-left: 45px;
  float: none;
}

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

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

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

76
    &.is-dropzone-hover {
77
      border-color: $green-500;
Phil Hughes's avatar
Phil Hughes committed
78
      box-shadow: 0 0 2px $black-transparent,
79
                  0 0 4px $green-500-focus;
80 81 82

      .comment-toolbar,
      .nav-links {
83
        border-color: $green-500;
84 85
      }
    }
86
  }
87 88
}

89 90 91 92 93 94 95
.md-header .nav-links {
  display: flex;
  display: -webkit-flex;
  flex-flow: row wrap;
  -webkit-flex-flow: row wrap;
  width: 100%;

Clement Ho's avatar
Clement Ho committed
96
  .float-right {
97 98 99 100 101
    // Flexbox quirk to make sure right-aligned items stay right-aligned.
    margin-left: auto;
  }
}

Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
102
.issuable-note-warning {
103
  color: $orange-600;
104
  background-color: $orange-100;
105 106
  border-radius: $border-radius-default $border-radius-default 0 0;
  border: 1px solid $border-gray-normal;
107
  border-bottom: 0;
108 109 110
  padding: 3px 12px;
  margin: auto;
  align-items: center;
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
111

112 113
  .icon {
    margin-right: $issuable-warning-icon-margin;
114 115
    vertical-align: text-bottom;
    fill: $orange-600;
116 117
  }

118 119 120
  + .md-area {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
121
  }
122 123

  .disabled-comment {
Simon Knox's avatar
Simon Knox committed
124
    border: 0;
125 126 127 128 129 130 131
    border-radius: $label-border-radius;
    padding-top: $gl-vert-padding;
    padding-bottom: $gl-vert-padding;

    .icon svg {
      position: relative;
      top: 2px;
132
      margin-right: $btn-margin-5;
133 134 135 136 137
      width: $gl-font-size;
      height: $gl-font-size;
      fill: $orange-600;
    }
  }
138 139
}

140 141
.sidebar-item-icon {
  border-radius: $border-radius-default;
142 143
  margin: 0 5px 0 0;
  vertical-align: text-bottom;
144 145 146

  &.is-active {
    fill: $orange-600;
147 148
  }

149 150 151
  .sidebar-collapsed-icon & {
    margin: 0;
  }
152

153 154 155
  .sidebar-item-value & {
    fill: $theme-gray-700;
  }
156 157
}

Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
158
.sidebar-item-warning-message {
159 160 161
  line-height: 1.5;
  padding: 16px;

Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
162
  .text {
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
163 164 165 166
    color: $text-color;
  }

  .sidebar-item-warning-message-actions {
167 168
    display: flex;

Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
169
    .btn {
170 171
      flex-grow: 1;
    }
172 173 174
  }
}

Phil Hughes's avatar
Phil Hughes committed
175
.discussion-form {
Clement Ho's avatar
Clement Ho committed
176 177 178
  background-color: $white-light;
}

179 180 181 182
table {
  .discussion-form-container {
    padding: $gl-padding-top $gl-padding $gl-padding;
  }
Felipe Artur's avatar
Felipe Artur committed
183 184
}

185 186 187 188
.discussion-notes .disabled-comment {
  padding: 6px 0;
}

189
.notes.notes-form > li.timeline-entry {
Clement Ho's avatar
Clement Ho committed
190
  @include notes-media('max', map-get($grid-breakpoints, md) - 1) {
191 192 193 194
    padding: 0;
  }

  .timeline-content {
Clement Ho's avatar
Clement Ho committed
195
    @include notes-media('max', map-get($grid-breakpoints, md) - 1) {
196 197 198 199 200 201 202
      margin: 0;
    }
  }

  .timeline-entry-inner {
    border: 0;
  }
203 204
}

205 206
.note-edit-form {
  display: none;
207
  font-size: 14px;
208

209
  .md-area {
210
    background-color: $white-light;
211 212 213 214 215 216 217 218 219 220 221 222 223 224
  }
}

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

.parallel-comment {
  padding: 6px;
}

.error-alert > .alert {
  margin-top: 5px;
  margin-bottom: 5px;
225 226 227 228 229

  &.alert-dismissable {
    .close {
      color: $white-light;
      opacity: 0.85;
230
      font-weight: $gl-font-weight-normal;
231 232 233 234 235 236

      &:hover {
        opacity: 1;
      }
    }
  }
237 238
}

239
.discussion-body {
240
  .discussion-reply-holder {
Clement Ho's avatar
Clement Ho committed
241
    background-color: $white-light;
242
    border-radius: 0 0 3px 3px;
243
    padding: 0 $gl-padding 10px;
Clement Ho's avatar
Clement Ho committed
244 245 246 247

    &.is-replying {
      padding-bottom: $gl-padding;
    }
248
  }
249 250 251 252 253 254

  .diff-file {
    .discussion-reply-holder {
      padding: 10px 16px;
    }
  }
255
}
256

257
.discussion-with-resolve-btn {
Fatih Acet's avatar
Fatih Acet committed
258 259 260 261 262
  @include media-breakpoint-up(sm) {
    display: flex;
  }


263 264 265
  .discussion-actions {
    display: table;

Fatih Acet's avatar
Fatih Acet committed
266
    svg {
267 268 269 270 271 272 273 274 275 276 277 278 279
      fill: $gray-darkest;
    }

    .btn-group {
      display: table-cell;

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

      &:first-child:not(:last-child) > div {
        border-right: 0;
      }
280
    }
281
  }
282 283 284 285

  .btn {
    width: 100%;
  }
Fatih Acet's avatar
Fatih Acet committed
286 287 288 289 290 291

  .btn-text-field {
    @include media-breakpoint-down(xs) {
      margin-bottom: $gl-padding-8;
    }
  }
292 293 294 295 296 297 298 299 300
}

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

.edit_note {
  .markdown-area {
    min-height: 140px;
301
    max-height: 500px;
302
  }
303

304
  .note-form-actions {
305
    background: transparent;
306 307
  }
}
308

309 310
.comment-toolbar {
  padding-top: $gl-padding-top;
311
  color: $gl-text-color-secondary;
312 313 314
  border-top: 1px solid $border-color;
}

Jacob Schatz's avatar
Jacob Schatz committed
315 316 317 318
.md-helper {
  padding-top: 10px;
}

319 320 321 322 323 324 325 326 327
.toolbar-button {
  padding: 0;
  background: none;
  border: 0;
  font-size: 14px;
  line-height: 16px;

  &:hover,
  &:focus {
328
    color: $blue-600;
329 330 331
    outline: 0;
  }

Clement Ho's avatar
Clement Ho committed
332
  @include media-breakpoint-up(md) {
Phil Hughes's avatar
Phil Hughes committed
333 334 335 336 337 338 339
    float: left;
    margin-right: $gl-padding;

    &:last-child {
      float: right;
      margin-right: 0;
    }
340 341 342 343 344 345 346 347 348 349 350 351 352 353
  }
}

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

.toolbar-text {
  font-size: 14px;
  line-height: 16px;
354
  margin-top: 2px;
Phil Hughes's avatar
Phil Hughes committed
355

Clement Ho's avatar
Clement Ho committed
356
  @include media-breakpoint-up(md) {
Phil Hughes's avatar
Phil Hughes committed
357 358
    float: left;
  }
359
}
Phil Hughes's avatar
Phil Hughes committed
360 361

.note-form-actions {
362 363
  color: $gl-text-color;

Clement Ho's avatar
Clement Ho committed
364
  @include media-breakpoint-down(xs) {
Phil Hughes's avatar
Phil Hughes committed
365 366 367 368 369 370 371 372 373 374
    .btn {
      float: none;
      width: 100%;

      &:not(:last-child) {
        margin-bottom: 10px;
      }
    }
  }
}
375 376 377 378 379 380 381 382

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

Clement Ho's avatar
Clement Ho committed
383
  @include media-breakpoint-down(xs) {
384 385 386 387 388 389
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 10px;
  }
}
390 391

.comment-type-dropdown {
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
392 393 394 395 396 397 398
  .comment-btn {
    width: auto;
  }

  .dropdown-toggle {
    float: right;

399
    i {
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
400 401 402 403
      color: $white-light;
      padding-right: 2px;
      margin-top: 2px;
    }
404 405 406 407 408 409

    &[disabled] {
      i {
        color: $gl-text-color-disabled;
      }
    }
410 411 412 413
  }

  .dropdown-menu {
    top: initial;
414
    bottom: 100%;
415
    width: 298px;
416 417
  }

Clement Ho's avatar
Clement Ho committed
418
  @include media-breakpoint-down(xs) {
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
419 420
    display: flex;
    width: 100%;
421
    margin-bottom: 10px;
Luke "Jared" Bennett's avatar
Luke "Jared" Bennett committed
422 423 424 425 426 427 428 429 430 431 432 433 434

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

    .dropdown-toggle {
      flex-grow: 0;
      flex-shrink: 1;
      width: auto;
    }
  }
435
}
436 437 438 439

.uploading-container {
  float: right;

Clement Ho's avatar
Clement Ho committed
440
  @include media-breakpoint-down(xs) {
441 442 443 444 445 446 447
    float: left;
    margin-top: 5px;
  }
}

.uploading-error-icon,
.uploading-error-message {
448
  color: $red-500;
449 450 451
}

.uploading-error-message {
Clement Ho's avatar
Clement Ho committed
452
  @include media-breakpoint-down(xs) {
453 454 455 456 457 458 459 460 461 462 463 464 465 466
    &::after {
      content: "\a";
      white-space: pre;
    }
  }
}

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

.attach-new-file,
.button-attach-file,
.retry-uploading-link {
467
  color: $blue-600;
468 469 470 471 472 473 474 475
  padding: 0;
  background: none;
  border: 0;
  font-size: 14px;
  line-height: 16px;
}

.markdown-selector {
476
  color: $blue-600;
477
}