note_form.scss 2.99 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
  font-family: $regular_font;
46
  border: 0;
47 48 49 50

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

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

.common-note-form {
60 61
  .md-area {
    padding: $gl-padding-top $gl-padding;
Phil Hughes's avatar
Phil Hughes committed
62
    border: 1px solid $note-form-border-color;
63
    border-radius: $border-radius-base;
Phil Hughes's avatar
Phil Hughes committed
64 65

    &.is-focused {
Phil Hughes's avatar
Phil Hughes committed
66
      border-color: $focus-border-color;
Phil Hughes's avatar
Phil Hughes committed
67
      box-shadow: 0 0 2px $black-transparent,
Phil Hughes's avatar
Phil Hughes committed
68
                  0 0 4px rgba($focus-border-color, .4);
Phil Hughes's avatar
Phil Hughes committed
69 70 71

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

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

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

Annabel Dunstone's avatar
Annabel Dunstone committed
87 88 89 90 91 92 93 94 95 96 97
    p {
      code {
        white-space: normal;
      }

      pre {
        code {
          white-space: pre;
        }
      }
    }
98
  }
99 100
}

Phil Hughes's avatar
Phil Hughes committed
101 102
.discussion-form {
  padding: $gl-padding-top $gl-padding;
Annabel Dunstone's avatar
Annabel Dunstone committed
103
  background-color: $white-light;
Phil Hughes's avatar
Phil Hughes committed
104 105
}

106 107
.note-edit-form {
  display: none;
108
  font-size: 15px;
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143

  .form-actions {
    padding-left: 20px;

    .btn-save {
      float: left;
    }

    .note-form-option {
      float: left;
      padding: 2px 0 0 25px;
    }
  }
}

.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 {
144 145
    background-color: $white-light;
    padding: 10px 16px;
146 147 148 149 150 151 152 153 154 155
  }
}

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

.edit_note {
  .markdown-area {
    min-height: 140px;
156
    max-height: 500px;
157 158
  }
  .note-form-actions {
159
    background: transparent;
160 161
  }
}
162

163 164
.comment-toolbar {
  padding-top: $gl-padding-top;
Phil Hughes's avatar
Phil Hughes committed
165
  color: $note-toolbar-color;
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
  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
182 183 184 185 186 187 188 189
  @media (min-width: $screen-md-min) {
    float: left;
    margin-right: $gl-padding;

    &:last-child {
      float: right;
      margin-right: 0;
    }
190 191 192 193 194 195 196 197 198 199 200 201 202 203
  }
}

.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
204 205 206 207

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