Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: better better fix for #598 #730

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions github-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -1196,20 +1196,30 @@
.pull-request-tab-content .diff-view .file-header {
position: sticky !important;
position: -webkit-sticky !important;
top: 40px !important;
top: 39px !important;
z-index: 6 !important;
}
.pull-request-tab-content .file-header {
padding: 1px 10px !important;
[id^=diff-].selected-line {
position: relative !important;
top: -120px !important;
left: -10000px !important;
}
.pull-request-tab-content .diff-view .file-actions,
.pull-request-tab-content .diff-view .file-info {
margin-top: -1px !important;
[id^=diff-].selected-line:before {
content: attr(data-line-number) !important;
position: absolute !important;
top: 120px !important;
left: 10000px !important;
background-color: inherit !important;
color: inherit !important;
box-sizing: border-box !important;
display: block !important;
padding: .04em 10px !important;
Copy link
Member Author

@the-j0k3r the-j0k3r Aug 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thirdly, I see this rendering issue:

its the .04em that maybe causing the rendering issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can do without specifying vertical padding, just specify horizontal only.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for me .04em is OK since .03em then I see a black underline

capture

So idk.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can do without specifying vertical padding, just specify horizontal only.

That makes the above issue more pronounced here, it was originally padding: 0 10px !important; and I couldnt get rid of that black line (which is something out of wack showing through)

capture

I couldnt adjust that with pixels, lol this whole issue and everything surrounding it is somewhat insanity inducing..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean 0, but specifying them individually so the original value is unchanged:

padding-left: 10px !important;
padding-right: 10px !important;

But anyway, I will retest a better solution later.

Copy link
Member Author

@the-j0k3r the-j0k3r Aug 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this worked

padding-left: 1px !important;
padding-right: 10px !important;

but try this

  @supports (position: sticky) or (position: -webkit-sticky) {
    .pull-request-tab-content .diff-view .file-header {
      position: sticky !important;
      position: -webkit-sticky !important;
      top: 39px !important;
      z-index: 6 !important;
    }
    [id^=diff-].selected-line {
      position: relative !important;
      top: -120px !important;
      left: -10000px !important;
    }
    [id^=diff-].selected-line:before {
      content: attr(data-line-number) !important;
      position: absolute !important;
      top: 120px !important;
      left: 10000px !important;
      background-color: inherit !important;
      color: inherit !important;
			padding-right: 10px !important;
      box-sizing: border-box !important;
      width: 100% !important;
			height: 21px !important;
    }
    /* Queried from GitHub's js for the scroll offset - keep at 60px not more */
    /* see https://github.com/StylishThemes/GitHub-Dark/issues/598 */
    .js-sticky-offset-scroll {
      height: 60px !important;
    }
  }

This comment was marked as outdated.

width: 100% !important;
}
/* below element is queried from GitHub's js for the scroll offset */
/* see https://github.com/StylishThemes/GitHub-Dark/issues/598 */
/* Queried from GitHub's js for the scroll offset - keep at 60px not more */
/* see https://github.com/StylishThemes/GitHub-Dark/issues/598 */
.js-sticky-offset-scroll {
height: 72px !important;
height: 60px !important;
}
}
/* User time line firsts */
Expand Down