Skip to content

Commit

Permalink
fix: Add missing padding to side by side line numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfpessoa committed Feb 9, 2020
1 parent ee58e2d commit bdd88f4
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/ui/css/diff2html.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 0.5em 0 0.5em;

This comment has been minimized.

Copy link
@campersau

campersau Feb 9, 2020

Contributor

This comment has been minimized.

Copy link
@rtfpessoa

rtfpessoa Feb 9, 2020

Author Owner

@campersau if you have any suggestions about generic fixes that would be nice for diff2html, please bring them up so I can introduce them.
I also just noticed #306

This comment has been minimized.

Copy link
@campersau

campersau Feb 9, 2020

Contributor

@rtfpessoa In side by side diffs there is currently a <span class="d2h-code-line-ctn">&nbsp;</span> rendered for lines which are missing which means they are selectable.

image

This comment has been minimized.

Copy link
@rtfpessoa

rtfpessoa Feb 9, 2020

Author Owner

At least in some cases that was not happening. I might need to revisit this better.

This comment has been minimized.

Copy link
@campersau

campersau Feb 9, 2020

Contributor

Adding something like

.d2h-emptyplaceholder {
  user-select: none;
}

seems to be enough. But haven't tested it fully.

This comment has been minimized.

Copy link
@rtfpessoa

rtfpessoa Feb 9, 2020

Author Owner

Ahhh, I misunderstood what you said. I see what you mean now.
Let me take a look. That might be enough.
Or the previous fix might fix this too.

This comment has been minimized.

Copy link
@rtfpessoa

rtfpessoa Feb 9, 2020

Author Owner

Should be fixed in #307

}

.d2h-code-side-linenumber:after {
Expand All @@ -204,6 +205,17 @@
border-color: #e1e1e1;
}

.d2h-code-linenumber,
.d2h-code-side-linenumber,
.d2h-code-line-prefix {
user-select: none;
}

.d2h-code-linenumber,
.d2h-code-side-linenumber {
direction: rtl;
}

/*
* Changes Highlight
*/
Expand Down Expand Up @@ -334,9 +346,3 @@
.d2h-moved-tag {
border: #3572b0 1px solid;
}

.d2h-code-linenumber,
.d2h-code-side-linenumber,
.d2h-code-line-prefix {
user-select: none;
}

0 comments on commit bdd88f4

Please sign in to comment.