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

feat(theme-default): sync anchor permalink function updates for better a11y #11

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion themes/theme-default/src/client/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
}

.theme-default-content {
a:hover {
a:not(.anchor-header):hover {
text-decoration: underline;
}

Expand Down
25 changes: 2 additions & 23 deletions themes/theme-default/src/client/styles/normalize.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ h6 {
}

&:hover .header-anchor {
opacity: 1;
color: var(--c-text-accent);
text-decoration: none;
}
}

Expand Down Expand Up @@ -125,28 +126,6 @@ h6 {
}

a {
&.header-anchor {
font-size: 0.85em;
float: left;
margin-left: -0.87em;
padding-right: 0.23em;
margin-top: 0.125em;
opacity: 0;
user-select: none;

@media print {
display: none;
}

&:hover {
text-decoration: none;
}

&:focus-visible {
opacity: 1;
}
}

@media print {
&[href^="http://"],
&[href^="https://"]
Expand Down