Commit d176f873 authored by Annabel Dunstone's avatar Annabel Dunstone

Add content attributes to discussion diffs; change styling of add-note icon to...

Add content attributes to discussion diffs; change styling of add-note icon to prevent white spaces in paste
parent 7030ffb0
......@@ -69,10 +69,12 @@
&.noteable_line.old:before {
content: '-';
position: absolute;
}
&.noteable_line.new:before {
content: '+';
position: absolute;
}
span {
......@@ -400,14 +402,22 @@
}
}
.diff-line-num:not(.js-unfold-bottom) {
.file-holder {
.diff-line-num:not(.js-unfold-bottom) {
a {
&:before {
content: attr(data-linenumber);
}
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
}
}
.discussion {
.diff-content {
.diff-line-num {
&:before {
content: attr(data-linenumber);
}
}
}
}
......@@ -276,8 +276,7 @@ ul.notes {
.diff-file tr.line_holder {
@mixin show-add-diff-note {
filter: alpha(opacity=100);
opacity: 1.0;
display: inline-block;
}
.add-diff-note {
......@@ -291,13 +290,8 @@ ul.notes {
position: absolute;
z-index: 10;
width: 32px;
transition: all 0.2s ease;
// "hide" it by default
opacity: 0.0;
filter: alpha(opacity=0);
display: none;
&:hover {
background: $gl-info;
color: #fff;
......
......@@ -9,9 +9,9 @@
- line_old = line_new - @form.offset
%tr.line_holder
%td.old_line.diff-line-num{data: {linenumber: line_old}}
/ = link_to raw(line_old), "#"
= link_to raw(line_old), "#"
%td.new_line.diff-line-num{data: {linenumber: line_old}}
/ = link_to raw(line_new) , "#"
= link_to raw(line_new) , "#"
%td.line_content.noteable_line==#{' ' * @form.indent}#{line}
- if @form.unfold? && @form.bottom? && @form.to < @blob.loc
......
......@@ -20,10 +20,8 @@
%td.new_line.diff-line-num= "..."
%td.line_content.match= line.text
- else
%td.old_line.diff-line-num
= raw(type == "new" ? "&nbsp;" : line.old_pos)
%td.new_line.diff-line-num
= raw(type == "old" ? "&nbsp;" : line.new_pos)
%td.old_line.diff-line-num{data: {linenumber: raw(type == "new" ? "&nbsp;" : line.old_pos)}}
%td.new_line.diff-line-num{data: {linenumber: raw(type == "old" ? "&nbsp;" : line.new_pos)}}
%td.line_content{class: "noteable_line #{type} #{line_code}", line_code: line_code}= diff_line_content(line.text)
- if line_code == note.line_code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment