Skip to content

Commit

Permalink
Merge pull request #348 from rtfpessoa/only-allow-selection-line-content
Browse files Browse the repository at this point in the history
fix: Only allow selection line content instead of parent element
  • Loading branch information
rtfpessoa authored Oct 29, 2020
2 parents e48259d + 33076dc commit 1f261e6
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/ui/css/diff2html.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,40 @@
.d2h-code-line {
display: inline-block;
white-space: nowrap;
user-select: none;
width: 100%;
/* Compensate for the absolute positioning of the line numbers */
padding: 0 8em;
}

.d2h-code-side-line {
display: inline-block;
white-space: nowrap;
user-select: none;
width: 100%;
/* Compensate for the absolute positioning of the line numbers */
padding: 0 4.5em;
}

.d2h-code-line-ctn {
display: inline-block;
background: none;
padding: 0;
word-wrap: normal;
white-space: pre;
user-select: text;
width: 100%;
vertical-align: middle;
}

.d2h-code-line del,
.d2h-code-side-line del {
display: inline-block;
margin-top: -1px;
text-decoration: none;
background-color: #ffb6ba;
border-radius: 0.2em;
vertical-align: middle;
}

.d2h-code-line ins,
Expand All @@ -124,6 +140,7 @@
background-color: #97f295;
border-radius: 0.2em;
text-align: left;
vertical-align: middle;
}

.d2h-code-line-prefix {
Expand All @@ -134,14 +151,6 @@
white-space: pre;
}

.d2h-code-line-ctn {
display: inline;
background: none;
padding: 0;
word-wrap: normal;
white-space: pre;
}

.line-num1 {
box-sizing: border-box;
float: left;
Expand Down

0 comments on commit 1f261e6

Please sign in to comment.