notes.scss 4.0 KB
Newer Older
D
Dmitriy Zaporozhets 已提交
1 2 3
/**
 * Notes
 */
4

D
Dmitriy Zaporozhets 已提交
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;

D
Dmitriy Zaporozhets 已提交
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 {
D
Dmitriy Zaporozhets 已提交
45 46 47
      &:before {
        content: "\00b7";
      }
D
Douwe Maan 已提交
48 49

      a {
D
Dmitriy Zaporozhets 已提交
50
        color: $gl-gray;
D
Douwe Maan 已提交
51 52 53 54 55

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

61
      &:hover {
D
Dmitriy Zaporozhets 已提交
62
        color: $gl-link-color;
63 64
      }
    }
65 66
    .author-username {
    }
D
Douwe Maan 已提交
67 68 69

    .note-role {
      float: right;
D
Douwe Maan 已提交
70
      margin-top: 1px;
D
Douwe Maan 已提交
71 72
      border: 1px solid #bbb;
      background-color: transparent;
73
      color: $gl-gray;
D
Douwe Maan 已提交
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 113 114
        ul.task-list {
          ul:not(.task-list) {
            padding-left: 1.3em;
115 116 117
          }
        }

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

126
    .note-header {
D
Dmitriy Zaporozhets 已提交
127
      padding-bottom: 3px;
128
    }
D
Dmitriy Zaporozhets 已提交
129 130 131 132

    &:last-child {
      border-bottom: none;
    }
133 134
  }
}
135

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

146
.diff-file .notes_holder {
147
  font-family: $regular_font;
148

R
Riyad Preukschas 已提交
149 150 151 152 153 154 155
  td {
    border: 1px solid #ddd;
    border-left: none;

    &.notes_line {
      text-align: center;
      padding: 10px 0;
156
      background: #FFF;
R
Riyad Preukschas 已提交
157
    }
158 159 160 161 162
    &.notes_line2 {
      text-align: center;
      padding: 10px 0;
      border-left: 1px solid #ddd !important;
    }
R
Riyad Preukschas 已提交
163
    &.notes_content {
164
      background-color: #fff;
R
Riyad Preukschas 已提交
165 166
      border-width: 1px 0;
      padding-top: 0;
167
      vertical-align: top;
168 169 170
      &.parallel{
        border-width: 1px;
      }
R
Riyad Preukschas 已提交
171
    }
172 173
  }
}
174 175

/**
176
 * Actions for Discussions/Notes
177
 */
178

179 180 181 182 183
.discussion,
.note {
  .discussion-actions,
  .note-actions {
    float: right;
D
Douwe Maan 已提交
184
    margin-left: 10px;
185 186

    a {
D
Douwe Maan 已提交
187
      margin-left: 5px;
188
      color: $gl-gray;
D
Douwe Maan 已提交
189 190 191 192 193

      i.fa {
        font-size: 16px;
        line-height: 16px;
      }
194 195

      &:hover {
D
Douwe Maan 已提交
196
        @extend .cgray;
197 198 199 200 201
        &.danger { @extend .cred; }
      }
    }
  }
}
202
.diff-file .note .note-actions {
203 204
  right: 0;
  top: 0;
D
Dmitriy Zaporozhets 已提交
205 206
}

R
Riyad Preukschas 已提交
207

R
Riyad Preukschas 已提交
208
/**
209
 * Line note button on the side of diffs
R
Riyad Preukschas 已提交
210
 */
211

212
.diff-file tr.line_holder {
213 214 215 216 217
  @mixin show-add-diff-note {
    filter: alpha(opacity=100);
    opacity: 1.0;
  }

R
Riyad Preukschas 已提交
218
  .add-diff-note {
219 220 221 222 223
    margin-top: -4px;
    @include border-radius(40px);
    background: #FFF;
    padding: 4px;
    font-size: 16px;
D
Dmitriy Zaporozhets 已提交
224
    color: $gl-link-color;
225
    margin-left: -60px;
226 227
    position: absolute;
    z-index: 10;
228
    width: 32px;
229

230 231
    transition: all 0.2s ease;

232
    // "hide" it by default
R
Riyad Preukschas 已提交
233 234
    opacity: 0.0;
    filter: alpha(opacity=0);
235

R
Riyad Preukschas 已提交
236
    &:hover {
237
      background: $gl-info;
238
      color: #FFF;
239
      @include show-add-diff-note;
R
Riyad Preukschas 已提交
240
    }
241
  }
242

K
Kevin Lyda 已提交
243
  // "show" the icon also if we just hover somewhere over the line
R
Riyad Preukschas 已提交
244 245 246 247
  &:hover > td {
    background: $hover !important;

    .add-diff-note {
248
      @include show-add-diff-note;
249
    }
R
randx 已提交
250
  }
251 252
}