-
Notifications
You must be signed in to change notification settings - Fork 7
/
github-fixed-header.user.css
152 lines (152 loc) · 4.6 KB
/
github-fixed-header.user.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* ==UserStyle==
@name GitHub Fixed Header
@version 1.2.18
@description Add a pinned header on GitHub
@namespace github.com/StylishThemes
@author StylishThemes <https://github.com/StylishThemes>
@homepageURL https://github.com/StylishThemes/GitHub-FixedHeader
@supportURL https://github.com/StylishThemes/GitHub-FixedHeader/issues
@updateURL https://github.com/StylishThemes/GitHub-FixedHeader/raw/master/github-fixed-header.user.css
@license CC-BY-SA-4.0
==/UserStyle== */
@-moz-document regexp("^https?://((gist|guides|help|raw|status|developer)\\.)?github\\.com/((?!generated_pages/preview).)*$") {
/* AGENT_SHEET */
:root {
--height: 65px;
--secondary-height: 40px;
}
body:not(.project-full-screen),
/* .is-stuck = discussion sidebar & https://github.com/integrations > Category */
.is-stuck {
padding-top: var(--height) !important;
}
body.logged-out:not(.f4),
body.session-authentication {
padding-top: var(--height) !important;
}
.pr-toolbar.is-stuck .diffbar {
background: #ddd;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
padding: 8px;
}
.gh-header .gh-header-sticky.is-stuck + .gh-header-shadow {
top: var(--height) !important;
}
/* Fix code block shift when sticky */
.highlight[style*="overflow-x"] {
overflow-x: unset !important;
}
/* Fix github.com/orgs/:org/people "Select all" sub-header */
.table-list-header.table-list-header-next.js-sticky.is-stuck {
height: calc(var(--height) + 50px);
}
/* Fix breaking floats */
.file-header:before {
clear: both;
}
/* Fixes other misalignment of headers */
.diff-view .file-header {
height: var(--secondary-height) !important;
}
.header-logged-out {
height: var(--height) !important;
}
.is-stuck ~ #files .file-actions,
.is-stuck ~ #files .file-info {
position: relative;
}
/* make diff file header sticky under the toolbar & main header;
* modified from Refined GitHub extension */
@supports (position: sticky) {
#files .file-header {
position: sticky !important;
position: -webkit-sticky !important;
top: 110px !important;
width: 100% !important;
height: 40px !important;
z-index: 6 !important;
}
#files .file-header.has-open-dropdown {
z-index: 10 !important;
}
}
/* user page bar now appears under fixed header */
.user-profile-sticky-bar:after, div.discussion-sidebar, div.blog-aside {
top: var(--height) !important;
}
#toc + #files .file-header {
top: var(--height) !important;
}
/* move loading bar into view */
.pjax-loader-bar, .pjax-loader-bar .progress {
z-index: 1001 !important;
}
/* move anchors below fixed header */
.accessibility-aid, a.anchor {
padding-top: 55px !important;
margin-top: -55px !important;
pointer-events: none;
/* anchors on help.github.com */
min-width: 5px !important;
display: inline-block !important;
}
a.anchor svg, /* spans used on help.github.com */
a.anchor span {
pointer-events: all !important;
min-width: 20px !important;
}
/* make personal, blog, explore, etc match logged in height */
.site-header {
padding-top: 10px !important;
padding-bottom: 10px !important;
}
/* page indicator on personal, open source, business & explore pages */
.site-header-nav-main .nav-item:after {
bottom: -10px !important;
}
/* .main-content? */
#js-flash-container + .main-content {
margin-top: 0 !important;
}
/* .header = logged-in */
body.logged-in .header,
/* .site-header = not-logged-in (removed 22 Aug 2017) */
.site-header,
/* .Header = (changed from .header) both logged in and not,
* added on 22 Aug 2017
*/
.Header,
/* .Header => .Header-old (changed ~18 March 2019),
* added .js-header-wrapper because it's the parent of .Header-old
*/
.js-header-wrapper, .Header-old,
/* #com #header = help.github.com */
#com #header {
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
width: 100% !important;
z-index: 1000 !important;
}
/*
* GitHub Notifications Dropdown userscript tweak
* https://openuserjs.org/scripts/joeytwiddle/Github_Notifications_Dropdown
*/
.notifications-dropdown, .Popover {
z-index: 1001 !important;
}
/* Octotree side panel open - see #6 */
.octotree-show .header .container, .octotree-show .Header .container {
margin-left: auto !important;
}
}
@-moz-document domain("gist.github.com") {
/* gists don't have a secondary header */
@supports (position: sticky) {
#files .file-header {
top: var(--height) !important;
}
}
}