Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do not underline navigation links#169

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 2 commits intopython:mainfromhugovk:nav-no-underline
Feb 4, 2024
Merged
Changes fromall 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
29 changes: 29 additions & 0 deletionspython_docs_theme/static/pydoctheme.css
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,6 +33,31 @@ a[href] {
text-decoration: underline 1px;
text-underline-offset: 0.25em;
}
/* No underline for navigation */
a.headerlink,
div.genindex-jumpbox a,
div.modindex-jumpbox a,
div#search-results a,
div.sphinxsidebar a,
div.toctree-wrapper a,
div[role=navigation] a,
table.contentstable a,
table.indextable a {
text-decoration: none;
}

/* Except when hovered */
div.genindex-jumpbox a:hover,
div.modindex-jumpbox a:hover,
div#search-results a:hover,
div.sphinxsidebar a:hover,
div.toctree-wrapper a:hover,
div[role=navigation] a:hover,
table.contentstable a:hover,
table.indextable a:hover {
text-decoration: underline;
text-underline-offset: auto;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

auto should already be the default -- is there something else overriding this when it's not explicitly stated, or did you add it as a precaution to prevent other rules from overriding the value in case the offset is added to some parent container in the future?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

is there something else overriding this when it's not explicitly stated ...

Yes, it's overridden by this:

a[href] {text-decoration: underline1px;text-underline-offset:0.25em;}

So "normal" body text links have underlines with extra offset; but navigational links only have underlines for hover, and they're the default offset.

ezio-melotti reacted with thumbs up emoji
}

body {
margin-left: 1em;
Expand DownExpand Up@@ -284,6 +309,10 @@ div.footer {
margin-right: 10px;
}

div.footer a {
text-underline-offset: auto;
}

div.footer a:hover {
color: #0095c4;
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp