diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-16 20:27:10 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-17 11:05:45 -0400 |
commit | b2ca5af1e1811d2ac00a552df4703e8f318582b8 (patch) | |
tree | 3ab5141576774065b67090fe7039ae91eab39c06 /coverage/htmlfiles/style.css | |
parent | e0775064500aad4a8b51e50db80587be62607e3d (diff) | |
download | python-coveragepy-git-b2ca5af1e1811d2ac00a552df4703e8f318582b8.tar.gz |
feat(html): sticky header on pyfile
Diffstat (limited to 'coverage/htmlfiles/style.css')
-rw-r--r-- | coverage/htmlfiles/style.css | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css index 8c9100c1..365d024e 100644 --- a/coverage/htmlfiles/style.css +++ b/coverage/htmlfiles/style.css @@ -28,12 +28,18 @@ a.nav { text-decoration: none; color: inherit; } a.nav:hover { text-decoration: underline; color: inherit; } -header { background: #f8f8f8; width: 100%; border-bottom: 1px solid #eee; } +header { background: #f8f8f8; width: 100%; border-bottom: 1px solid #ccc; } @media (prefers-color-scheme: dark) { header { background: black; } } @media (prefers-color-scheme: dark) { header { border-color: #333; } } +header .content { padding: 1rem 3.5rem; } + +header.hidden { visibility: hidden; } + +main { position: relative; z-index: 1; } + .indexfile footer { margin: 1rem 3.5rem; } .pyfile footer { margin: 1rem 1rem; } @@ -44,7 +50,13 @@ footer .content { padding: 0; color: #666; font-style: italic; } #index { margin: 1rem 0 0 3.5rem; } -header .content { padding: 1rem 3.5rem; } +#sticky_header { display: none; position: fixed; z-index: 2; left: 0; right: 0; background: #f8f8f8; border-bottom: 1px solid #ccc; } + +#sticky_header .content { padding: 0.5rem 3.5rem; } + +#sticky_header .content p { font-size: 1em; } + +#sticky_header.visible { display: block; } h1 { font-size: 1.25em; display: inline-block; } @@ -68,8 +80,6 @@ h2.stats { margin-top: .5em; font-size: 1em; } .stats button:active, .stats button:focus { outline: 2px dashed #007acc; } -.stats button:active, .stats button:focus { outline: 2px dashed #007acc; } - .stats button.run { background: #eeffee; } @media (prefers-color-scheme: dark) { .stats button.run { background: #373d29; } } @@ -280,7 +290,7 @@ h2.stats { margin-top: .5em; font-size: 1em; } #index tr.file:hover td.name { text-decoration: underline; color: inherit; } -#scroll_marker { position: fixed; right: 0; top: 0; width: 16px; height: 100%; background: #fff; border-left: 1px solid #eee; will-change: transform; } +#scroll_marker { position: fixed; z-index: 3; right: 0; top: 0; width: 16px; height: 100%; background: #fff; border-left: 1px solid #eee; will-change: transform; } @media (prefers-color-scheme: dark) { #scroll_marker { background: #1e1e1e; } } |