BigW Consortium Gitlab

notes.scss 4.12 KB
Newer Older
1 2 3
/**
 * Notes
 */
4

Dmitriy Zaporozhets committed
5
@-webkit-keyframes targe3-note {
6 7 8 9 10
  from { background:#fffff0; }
  50% { background:#ffffd3; }
  to { background:#fffff0; }
}

11
ul.notes {
12 13 14 15
  display: block;
  list-style: none;
  margin: 0px;
  padding: 0px;
16

17 18 19 20
  .system-note {
    font-size: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
21
    background: #FDFDFD;
22 23 24 25 26 27 28 29

    .timeline-icon {
      .avatar {
        visibility: hidden;
      }
    }
  }

30 31 32 33
  .discussion-header,
  .note-header {
    @extend .cgray;

34 35 36 37
    a:hover {
      text-decoration: none;
    }

38 39 40 41 42 43 44
    .avatar {
      float: left;
      margin-right: 10px;
    }

    .discussion-last-update,
    .note-last-update {
45 46 47
      &:before {
        content: "\00b7";
      }
48 49

      a {
50
        color: $gl-gray;
51 52 53 54 55

        &:hover {
          text-decoration: underline;
        }
      }
56
    }
57
    .author {
58 59 60
      color: #4c4e54;
      margin-right: 3px;

61
      &:hover {
62
        color: $gl-link-color;
63 64
      }
    }
65 66
    .author-username {
    }
67 68 69

    .note-role {
      float: right;
70
      margin-top: 1px;
71 72
      border: 1px solid #bbb;
      background-color: transparent;
73
      color: $gl-gray;
74
    }
75 76
  }

77 78 79 80
  .discussion-body {
    padding-top: 15px;
  }

81 82 83 84 85 86 87 88 89
  .discussion {
    overflow: hidden;
    display: block;
    position:relative;
  }

  .note {
    display: block;
    position:relative;
90

91
    .note-body {
92
      overflow: auto;
93

94 95 96 97
      .note-text {
        overflow: auto;
        word-wrap: break-word;
        @include md-typography;
98

99 100 101 102 103 104 105 106 107 108 109 110 111
        // Reset ul style types since we're nested inside a ul already
        & > ul {
          list-style-type: disc;

          ul {
            list-style-type: circle;

            ul {
              list-style-type: square;
            }
          }
        }

112
        // Reduce left padding of first task list ul element
113 114 115
        ul.task-list:first-child {
          padding-left: 10px;

116
          // sub-tasks should be padded normally
117 118 119 120 121
          ul {
            padding-left: 20px;
          }
        }

122
        hr {
123 124
          // Darken 'whitesmoke' a bit to make it more visible in note bodies
          border-color: darken(#F5F5F5, 8%);
125
          margin: 10px 0;
126
        }
127
      }
128
    }
129

130
    .note-header {
131
      padding-bottom: 3px;
132
    }
133 134 135 136

    &:last-child {
      border-bottom: none;
    }
137 138
  }
}
139

140
// Diff code in discussion view
141 142 143 144 145 146 147
.discussion-body .diff-file {
  .diff-header > span {
    margin-right: 10px;
  }
  .line_content {
    white-space: pre-wrap;
  }
148 149
}

150
.diff-file .notes_holder {
151
  font-family: $regular_font;
152

153 154 155 156 157 158 159
  td {
    border: 1px solid #ddd;
    border-left: none;

    &.notes_line {
      text-align: center;
      padding: 10px 0;
160
      background: #FFF;
161
    }
162 163 164 165 166
    &.notes_line2 {
      text-align: center;
      padding: 10px 0;
      border-left: 1px solid #ddd !important;
    }
167
    &.notes_content {
168
      background-color: #fff;
169 170
      border-width: 1px 0;
      padding-top: 0;
171
      vertical-align: top;
172 173 174
      &.parallel{
        border-width: 1px;
      }
175
    }
176 177
  }
}
178 179

/**
180
 * Actions for Discussions/Notes
181
 */
182

183 184 185 186 187
.discussion,
.note {
  .discussion-actions,
  .note-actions {
    float: right;
188
    margin-left: 10px;
189 190

    a {
191
      margin-left: 5px;
192
      color: $gl-gray;
193 194 195 196 197

      i.fa {
        font-size: 16px;
        line-height: 16px;
      }
198 199

      &:hover {
200
        @extend .cgray;
201 202 203 204 205
        &.danger { @extend .cred; }
      }
    }
  }
}
206
.diff-file .note .note-actions {
207 208
  right: 0;
  top: 0;
Dmitriy Zaporozhets committed
209 210
}

211

212
/**
213
 * Line note button on the side of diffs
214
 */
215

216
.diff-file tr.line_holder {
217 218 219 220 221
  @mixin show-add-diff-note {
    filter: alpha(opacity=100);
    opacity: 1.0;
  }

222
  .add-diff-note {
223 224 225 226 227
    margin-top: -4px;
    @include border-radius(40px);
    background: #FFF;
    padding: 4px;
    font-size: 16px;
228
    color: $gl-link-color;
229
    margin-left: -60px;
230 231
    position: absolute;
    z-index: 10;
232
    width: 32px;
233

234 235
    transition: all 0.2s ease;

236
    // "hide" it by default
237 238
    opacity: 0.0;
    filter: alpha(opacity=0);
239

240
    &:hover {
241
      background: $gl-info;
242
      color: #FFF;
243
      @include show-add-diff-note;
244
    }
245
  }
246

Kevin Lyda committed
247
  // "show" the icon also if we just hover somewhere over the line
248 249 250 251
  &:hover > td {
    background: $hover !important;

    .add-diff-note {
252
      @include show-add-diff-note;
253
    }
randx committed
254
  }
255 256
}