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

Dmitriy Zaporozhets's avatar
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 21

  .discussion-header,
  .note-header {
    @extend .cgray;
    padding-bottom: 15px;

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
22 23 24 25
    a:hover {
      text-decoration: none;
    }

26 27 28 29 30 31 32
    .avatar {
      float: left;
      margin-right: 10px;
    }

    .discussion-last-update,
    .note-last-update {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
33 34 35
      &:before {
        content: "\00b7";
      }
36

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
37
      font-size: 13px;
38 39

      a {
40
        @extend .cgray;
41 42 43 44 45

        &:hover {
          text-decoration: underline;
        }
      }
46
    }
47
    .author {
48
      color: #333;
49 50
      font-weight: bold;
      &:hover {
51
        color: $gl-link-color;
52 53
      }
    }
54 55
    .author-username {
    }
Douwe Maan's avatar
Douwe Maan committed
56 57 58

    .note-role {
      float: right;
59
      margin-top: 1px;
Douwe Maan's avatar
Douwe Maan committed
60 61 62 63
      border: 1px solid #bbb;
      background-color: transparent;
      color: #999;
    }
64 65 66 67 68 69 70 71 72 73 74
  }

  .discussion {
    overflow: hidden;
    display: block;
    position:relative;
  }

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

76
    .note-body {
77
      overflow: auto;
78

79 80 81 82
      .note-text {
        overflow: auto;
        word-wrap: break-word;
        @include md-typography;
83

84 85 86 87 88 89 90 91 92 93 94 95 96
        // 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;
            }
          }
        }

97
        // Reduce left padding of first task list ul element
98 99 100
        ul.task-list:first-child {
          padding-left: 10px;

101
          // sub-tasks should be padded normally
102 103 104 105 106
          ul {
            padding-left: 20px;
          }
        }

107
        hr {
108 109
          // Darken 'whitesmoke' a bit to make it more visible in note bodies
          border-color: darken(#F5F5F5, 8%);
110
          margin: 10px 0;
111
        }
112
      }
113
    }
114

115
    .note-header {
116
      padding-bottom: 3px;
117
    }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
118 119 120 121

    &:last-child {
      border-bottom: none;
    }
122 123
  }
}
124

125
// Diff code in discussion view
126 127 128 129 130 131 132
.discussion-body .diff-file {
  .diff-header > span {
    margin-right: 10px;
  }
  .line_content {
    white-space: pre-wrap;
  }
133 134
}

135
.diff-file .notes_holder {
136 137
  font-size: 13px;
  line-height: 18px;
138
  font-family: $regular_font;
139

140 141 142 143 144 145 146
  td {
    border: 1px solid #ddd;
    border-left: none;

    &.notes_line {
      text-align: center;
      padding: 10px 0;
147
      background: #FFF;
148
    }
149 150 151 152 153
    &.notes_line2 {
      text-align: center;
      padding: 10px 0;
      border-left: 1px solid #ddd !important;
    }
154
    &.notes_content {
155
      background-color: #fff;
156 157
      border-width: 1px 0;
      padding-top: 0;
158
      vertical-align: top;
159 160 161
      &.parallel{
        border-width: 1px;
      }
162
    }
163 164
  }
}
165 166

/**
167
 * Actions for Discussions/Notes
168
 */
169

170 171 172 173 174
.discussion,
.note {
  .discussion-actions,
  .note-actions {
    float: right;
175
    margin-left: 10px;
176 177

    a {
Douwe Maan's avatar
Douwe Maan committed
178 179
      margin-left: 5px;

180 181 182 183 184 185
      color: #999;

      i.fa {
        font-size: 16px;
        line-height: 16px;
      }
186 187

      &:hover {
188
        @extend .cgray;
189 190 191 192 193
        &.danger { @extend .cred; }
      }
    }
  }
}
194
.diff-file .note .note-actions {
195 196
  right: 0;
  top: 0;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
197 198
}

199

200
/**
201
 * Line note button on the side of diffs
202
 */
203

204
.diff-file tr.line_holder {
205 206 207 208 209
  @mixin show-add-diff-note {
    filter: alpha(opacity=100);
    opacity: 1.0;
  }

210
  .add-diff-note {
211 212 213 214 215
    margin-top: -4px;
    @include border-radius(40px);
    background: #FFF;
    padding: 4px;
    font-size: 16px;
216
    color: $gl-link-color;
217
    margin-left: -60px;
218 219
    position: absolute;
    z-index: 10;
220
    width: 32px;
221

222 223
    transition: all 0.2s ease;

224
    // "hide" it by default
225 226
    opacity: 0.0;
    filter: alpha(opacity=0);
227

228
    &:hover {
229 230 231
      width: 38px;
      font-size: 20px;
      background: $gl-info;
232
      color: #FFF;
233
      @include show-add-diff-note;
234
    }
235
  }
236

Kevin Lyda's avatar
Kevin Lyda committed
237
  // "show" the icon also if we just hover somewhere over the line
238 239 240 241
  &:hover > td {
    background: $hover !important;

    .add-diff-note {
242
      @include show-add-diff-note;
243
    }
randx's avatar
randx committed
244
  }
245 246
}