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

fix: unexpected shift of the entire article when anchor hidden = false #1649

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
43 changes: 37 additions & 6 deletions assets/css/common/post-single.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,15 @@
font-size: 12px;
}

.post-content a,
.toc a:hover {
box-shadow: 0 1px 0;
box-decoration-break: clone;
-webkit-box-decoration-break: clone;

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
position: relative;
display: inline-block;
}

.post-content a code {
Expand Down Expand Up @@ -356,11 +360,38 @@ h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
position: absolute;
display: inline-flex;
color: var(--secondary);
margin-inline-start: 8px;
font-weight: 500;
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 {
Expand Down Expand Up @@ -406,4 +437,4 @@ h1>a>svg {
img.in-text {
display: inline;
margin: auto;
}
}