diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-20 20:43:38 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-20 20:43:38 -0400 |
commit | e2281bc901150bafb6f64e62807b32abf22520a7 (patch) | |
tree | d897c559f570938d35720232f86a4cabd6286004 /tests | |
parent | afe6cf34d022e8dbbaa47826c487a98ca6832721 (diff) | |
download | python-coveragepy-git-e2281bc901150bafb6f64e62807b32abf22520a7.tar.gz |
fix(html): scrolling to an anchor ensures the line is visible
The sticky header was hiding the line scrolled to the top of the window.
Along the way, also changed to use classes on <body> to control the
sticky header, and moved the header code into a function.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gold/html/styled/style.css | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gold/html/styled/style.css b/tests/gold/html/styled/style.css index aa7341b5..245aa83d 100644 --- a/tests/gold/html/styled/style.css +++ b/tests/gold/html/styled/style.css @@ -36,7 +36,7 @@ header { background: #f8f8f8; width: 100%; border-bottom: 1px solid #ccc; } header .content { padding: 1rem 3.5rem; } -header.hidden { visibility: hidden; } +.littlehead header { visibility: hidden; } main { position: relative; z-index: 1; } @@ -56,7 +56,7 @@ footer .content { padding: 0; color: #666; font-style: italic; } #sticky_header .content p { font-size: 1em; } -#sticky_header.visible { display: block; } +.littlehead #sticky_header { display: block; } h1 { font-size: 1.25em; display: inline-block; } @@ -134,7 +134,7 @@ h2.stats { margin-top: .5em; font-size: 1em; } #source { padding: 1em 0 1em 3.5rem; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; } -#source p { position: relative; white-space: pre; } +#source p { margin-top: -4em; padding-top: 4em; position: relative; white-space: pre; } #source p * { box-sizing: border-box; } |