BigW Consortium Gitlab

note_form.scss 4.7 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

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

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

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

40 41 42
  img {
    max-width: 100%;
  }
43 44
}

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

  &:focus {
    outline: 0;
  }
55 56 57 58 59 60 61 62 63
}

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

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

    &.is-focused {
72
      @extend .form-control:focus;
73 74 75

      .comment-toolbar,
      .nav-links {
76
        border-color: $focus-border-color;
77 78
      }
    }
Annabel Dunstone committed
79

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

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

93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
.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;
113
  font-size: 12px;
114

115
  @media (max-width: $screen-sm-max) {
116 117 118 119 120 121 122 123 124 125
    // 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 committed
126 127
.discussion-form {
  padding: $gl-padding-top $gl-padding;
Annabel Dunstone committed
128
  background-color: $white-light;
Phil Hughes committed
129 130
}

131 132
.note-edit-form {
  display: none;
133
  font-size: 14px;
134

135
  .md-area {
136
    background-color: $white-light;
137 138 139 140 141 142 143 144 145 146 147 148 149 150
  }
}

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

.parallel-comment {
  padding: 6px;
}

.error-alert > .alert {
  margin-top: 5px;
  margin-bottom: 5px;
151 152 153 154 155 156 157 158 159 160 161 162

  &.alert-dismissable {
    .close {
      color: $white-light;
      opacity: 0.85;
      font-weight: normal;

      &:hover {
        opacity: 1;
      }
    }
  }
163 164 165 166 167 168 169 170 171
}

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

  .discussion-reply-holder {
172 173
    background-color: $white-light;
    padding: 10px 16px;
174 175
  }
}
176

177 178 179 180 181 182 183 184 185 186
.discussion-with-resolve-btn {
  display: table;
  width: 100%;
  border-collapse: separate;
  table-layout: auto;

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

188
    &:first-child {
189
      width: 100%;
190
      padding-right: 5px;
191 192
    }

193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
  }

  .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;
      }
212
    }
213
  }
214 215 216 217

  .btn {
    width: 100%;
  }
218 219 220 221 222 223 224 225 226
}

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

.edit_note {
  .markdown-area {
    min-height: 140px;
227
    max-height: 500px;
228
  }
229

230
  .note-form-actions {
231
    background: transparent;
232 233
  }
}
234

235 236
.comment-toolbar {
  padding-top: $gl-padding-top;
237
  color: $gl-text-color-secondary;
238 239 240
  border-top: 1px solid $border-color;
}

241 242 243 244
.md-helper {
  padding-top: 10px;
}

245 246 247 248 249 250 251 252 253 254 255 256 257
.toolbar-button {
  padding: 0;
  background: none;
  border: 0;
  font-size: 14px;
  line-height: 16px;

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

258 259 260 261 262 263 264 265
  @media (min-width: $screen-md-min) {
    float: left;
    margin-right: $gl-padding;

    &:last-child {
      float: right;
      margin-right: 0;
    }
266 267 268 269 270 271 272 273 274 275 276 277 278 279
  }
}

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

.toolbar-text {
  font-size: 14px;
  line-height: 16px;
280 281 282 283

  @media (min-width: $screen-md-min) {
    float: left;
  }
284
}
Phil Hughes committed
285 286 287 288 289 290 291 292 293 294 295 296 297

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

      &:not(:last-child) {
        margin-bottom: 10px;
      }
    }
  }
}
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312

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