notes.scss 3.14 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 36
      &:before {
        content: "\00b7";
      }
      font-size: 13px;
37
    }
38
    .author {
39
      color: #333;
40
      font-weight: bold;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
41
      font-size: 14px;
42
      &:hover {
43
        color: $link_color;
44 45
      }
    }
46 47 48
    .author-username {
      font-size: 14px;
    }
49 50 51 52 53 54 55 56 57 58 59
  }

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

  .note {
    display: block;
    position:relative;
60
    .attachment {
61
      font-size: 14px;
62 63
    }
    .note-body {
64
      overflow: auto;
65 66 67 68 69
      .note-text {
        overflow: auto;
        word-wrap: break-word;
        @include md-typography;
      }
70 71
    }
    .note-header {
72
      padding-bottom: 3px;
73
    }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
74 75 76 77

    &:last-child {
      border-bottom: none;
    }
78 79
  }
}
80

81
.diff-file .notes_holder {
82 83
  font-size: 13px;
  line-height: 18px;
84
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
85

86 87 88 89 90 91 92
  td {
    border: 1px solid #ddd;
    border-left: none;

    &.notes_line {
      text-align: center;
      padding: 10px 0;
93
      background: #FFF;
94
    }
95 96 97 98 99
    &.notes_line2 {
      text-align: center;
      padding: 10px 0;
      border-left: 1px solid #ddd !important;
    }
100
    &.notes_content {
101
      background-color: #fff;
102 103
      border-width: 1px 0;
      padding-top: 0;
104
      vertical-align: top;
105 106 107
      &.parallel{
        border-width: 1px;
      }
108
    }
109 110
  }
}
111 112

/**
113
 * Actions for Discussions/Notes
114
 */
115

116 117 118 119 120 121 122 123 124 125 126 127 128 129
.discussion,
.note {
  &.note:hover {
    .note-actions { display: block; }
  }
  .discussion-header:hover {
    .discussion-actions { display: block; }
  }

  .discussion-actions,
  .note-actions {
    display: none;
    float: right;

130
    [class~="fa"] {
131 132 133 134 135 136 137 138 139
      font-size: 16px;
      line-height: 16px;
      vertical-align: middle;
    }

    a {
      @extend .cgray;

      &:hover {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
140
        color: $link_hover_color;
141 142 143 144 145
        &.danger { @extend .cred; }
      }
    }
  }
}
146
.diff-file .note .note-actions {
147 148
  right: 0;
  top: 0;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
149 150
}

151

152
/**
153
 * Line note button on the side of diffs
154
 */
155

156
.diff-file tr.line_holder {
157 158 159 160 161
  @mixin show-add-diff-note {
    filter: alpha(opacity=100);
    opacity: 1.0;
  }

162
  .add-diff-note {
163 164 165 166 167 168 169
    margin-top: -4px;
    @include border-radius(40px);
    background: #FFF;
    padding: 4px;
    font-size: 16px;
    color: $link_color;
    margin-left: -60px;
170 171 172
    position: absolute;
    z-index: 10;

173 174
    transition: all 0.2s ease;

175
    // "hide" it by default
176 177
    opacity: 0.0;
    filter: alpha(opacity=0);
178

179
    &:hover {
180 181 182
      font-size: 24px;
      background: $bg_primary;
      color: #FFF;
183
      @include show-add-diff-note;
184
    }
185
  }
186

Kevin Lyda's avatar
Kevin Lyda committed
187
  // "show" the icon also if we just hover somewhere over the line
188 189 190 191
  &:hover > td {
    background: $hover !important;

    .add-diff-note {
192
      @include show-add-diff-note;
193
    }
randx's avatar
randx committed
194
  }
195 196
}