mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-01-25 20:03:14 -05:00
fix: unexpected shift of the entire article when anchor hidden = false
When a heading occupies an entire line, moving the mouse over the heading causes the entire article to unexpectedly shift down by one line.
This commit is contained in:
parent
3e53621007
commit
617feaa04e
@ -69,11 +69,15 @@
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-content a,
|
|
||||||
.toc a:hover {
|
.post-content h1,
|
||||||
box-shadow: 0 1px 0;
|
.post-content h2,
|
||||||
box-decoration-break: clone;
|
.post-content h3,
|
||||||
-webkit-box-decoration-break: clone;
|
.post-content h4,
|
||||||
|
.post-content h5,
|
||||||
|
.post-content h6 {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-content a code {
|
.post-content a code {
|
||||||
@ -356,11 +360,38 @@ h3:hover .anchor,
|
|||||||
h4:hover .anchor,
|
h4:hover .anchor,
|
||||||
h5:hover .anchor,
|
h5:hover .anchor,
|
||||||
h6:hover .anchor {
|
h6:hover .anchor {
|
||||||
|
position: absolute;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
color: var(--secondary);
|
color: var(--secondary);
|
||||||
margin-inline-start: 8px;
|
margin-inline-start: 8px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
padding-left: 30px;
|
||||||
|
margin-left: -25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:hover .anchor::after,
|
||||||
|
h2:hover .anchor::after,
|
||||||
|
h3:hover .anchor::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 25px;
|
||||||
|
width: 50%;
|
||||||
|
height: 1px;
|
||||||
|
background-color: var(--secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
h4:hover .anchor::after,
|
||||||
|
h5:hover .anchor::after,
|
||||||
|
h6:hover .anchor::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 29px;
|
||||||
|
width: 25%;
|
||||||
|
height: 1px;
|
||||||
|
background-color: var(--secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.paginav {
|
.paginav {
|
||||||
@ -406,4 +437,4 @@ h1>a>svg {
|
|||||||
img.in-text {
|
img.in-text {
|
||||||
display: inline;
|
display: inline;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user