notes.scss 4.2 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
  display: block;
  list-style: none;
14 15
  margin: 0;
  padding: 0;
16

A
Alfredo Sumaran 已提交
17 18 19 20 21
  .timeline-icon {
    float: left;
  }

  .timeline-content {
A
Alfredo Sumaran 已提交
22
    margin-left: 55px;
A
Alfredo Sumaran 已提交
23 24
  }

A
Alfredo Sumaran 已提交
25
  .note_created_ago, .note-updated-at {
A
Alfredo Sumaran 已提交
26 27 28
    white-space: nowrap;
  }

29 30 31 32
  .system-note {
    font-size: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
33
    background: #fdfdfd;
34 35 36 37 38 39 40 41

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

42 43 44 45
  .discussion-header,
  .note-header {
    @extend .cgray;

D
Dmitriy Zaporozhets 已提交
46 47 48 49
    a:hover {
      text-decoration: none;
    }

50 51 52 53 54 55 56
    .avatar {
      float: left;
      margin-right: 10px;
    }

    .discussion-last-update,
    .note-last-update {
D
Dmitriy Zaporozhets 已提交
57 58 59
      &:before {
        content: "\00b7";
      }
D
Douwe Maan 已提交
60 61

      a {
D
Dmitriy Zaporozhets 已提交
62
        color: $gl-gray;
D
Douwe Maan 已提交
63 64 65 66 67

        &:hover {
          text-decoration: underline;
        }
      }
68
    }
69
    .author {
D
Dmitriy Zaporozhets 已提交
70 71 72
      color: #4c4e54;
      margin-right: 3px;

73
      &:hover {
D
Dmitriy Zaporozhets 已提交
74
        color: $gl-link-color;
75 76
      }
    }
77 78
    .author-username {
    }
D
Douwe Maan 已提交
79 80 81

    .note-role {
      float: right;
D
Douwe Maan 已提交
82
      margin-top: 1px;
D
Douwe Maan 已提交
83 84
      border: 1px solid #bbb;
      background-color: transparent;
85
      color: $gl-gray;
D
Douwe Maan 已提交
86
    }
87 88
  }

89 90 91 92
  .discussion-body {
    padding-top: 15px;
  }

93 94 95 96 97 98 99 100 101
  .discussion {
    overflow: hidden;
    display: block;
    position:relative;
  }

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

103
    .note-body {
104
      overflow: auto;
105

106 107 108 109
      .note-text {
        overflow: auto;
        word-wrap: break-word;
        @include md-typography;
110

111 112 113 114 115 116 117 118 119 120 121 122 123
        // 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;
            }
          }
        }

124 125 126
        ul.task-list {
          ul:not(.task-list) {
            padding-left: 1.3em;
127 128 129
          }
        }

130
        hr {
131
          // Darken 'whitesmoke' a bit to make it more visible in note bodies
132
          border-color: darken(#f5f5f5, 8%);
133
          margin: 10px 0;
134
        }
135
      }
136
    }
137

138
    .note-header {
D
Dmitriy Zaporozhets 已提交
139
      padding-bottom: 3px;
140
    }
D
Dmitriy Zaporozhets 已提交
141 142

    &:last-child {
143
      border-bottom: 1px solid $border-color;
D
Dmitriy Zaporozhets 已提交
144
    }
145 146
  }
}
147

148
// Diff code in discussion view
149 150 151 152 153 154 155
.discussion-body .diff-file {
  .diff-header > span {
    margin-right: 10px;
  }
  .line_content {
    white-space: pre-wrap;
  }
156 157
}

158
.diff-file .notes_holder {
159
  font-family: $regular_font;
160

R
Riyad Preukschas 已提交
161 162 163 164 165
  td {
    border: 1px solid #ddd;
    border-left: none;

    &.notes_line {
166
      vertical-align: middle;
R
Riyad Preukschas 已提交
167 168
      text-align: center;
      padding: 10px 0;
169
      background: #fff;
170
      color: $text-color;
R
Riyad Preukschas 已提交
171
    }
172 173 174 175 176
    &.notes_line2 {
      text-align: center;
      padding: 10px 0;
      border-left: 1px solid #ddd !important;
    }
R
Riyad Preukschas 已提交
177
    &.notes_content {
178
      background-color: #fff;
R
Riyad Preukschas 已提交
179 180
      border-width: 1px 0;
      padding-top: 0;
181
      vertical-align: top;
182 183 184
      &.parallel{
        border-width: 1px;
      }
R
Riyad Preukschas 已提交
185
    }
186 187
  }
}
188 189

/**
190
 * Actions for Discussions/Notes
191
 */
192

193 194 195 196 197
.discussion,
.note {
  .discussion-actions,
  .note-actions {
    float: right;
D
Douwe Maan 已提交
198
    margin-left: 10px;
199 200

    a {
D
Douwe Maan 已提交
201
      margin-left: 5px;
202
      color: $gl-gray;
D
Douwe Maan 已提交
203 204 205 206 207

      i.fa {
        font-size: 16px;
        line-height: 16px;
      }
208 209

      &:hover {
D
Douwe Maan 已提交
210
        @extend .cgray;
211 212 213 214 215
        &.danger { @extend .cred; }
      }
    }
  }
}
216
.diff-file .note .note-actions {
217 218
  right: 0;
  top: 0;
D
Dmitriy Zaporozhets 已提交
219 220
}

R
Riyad Preukschas 已提交
221

R
Riyad Preukschas 已提交
222
/**
223
 * Line note button on the side of diffs
R
Riyad Preukschas 已提交
224
 */
225

226
.diff-file tr.line_holder {
227 228 229 230 231
  @mixin show-add-diff-note {
    filter: alpha(opacity=100);
    opacity: 1.0;
  }

R
Riyad Preukschas 已提交
232
  .add-diff-note {
233 234
    margin-top: -4px;
    @include border-radius(40px);
235
    background: #fff;
236 237
    padding: 4px;
    font-size: 16px;
D
Dmitriy Zaporozhets 已提交
238
    color: $gl-link-color;
239
    margin-left: -60px;
240 241
    position: absolute;
    z-index: 10;
242
    width: 32px;
243

244 245
    transition: all 0.2s ease;

246
    // "hide" it by default
R
Riyad Preukschas 已提交
247 248
    opacity: 0.0;
    filter: alpha(opacity=0);
249

R
Riyad Preukschas 已提交
250
    &:hover {
251
      background: $gl-info;
252
      color: #fff;
253
      @include show-add-diff-note;
R
Riyad Preukschas 已提交
254
    }
255
  }
256

K
Kevin Lyda 已提交
257
  // "show" the icon also if we just hover somewhere over the line
R
Riyad Preukschas 已提交
258 259
  &:hover > td {
    .add-diff-note {
260
      @include show-add-diff-note;
261
    }
R
randx 已提交
262
  }
263
}