1
Fork 0

rustdoc: remove unneeded .content selector from link colors

Since 98f05a0282 and
b5963f07e6 removed color classes from sidebar
items, there's no need for the selectors to be so specific any more.

This commit does have to change `h1.fqn a` to just be `h1 a`, so that the
header link color selector is less specific than the typed link at the end.
Since #89506 made docblocks start at `h2`, the main page link header should
be the only h1 in the page now.
This commit is contained in:
Michael Howell 2022-10-11 09:22:40 -07:00
parent b5963f07e6
commit 062284af6e
2 changed files with 28 additions and 28 deletions

View file

@ -218,55 +218,55 @@ pre.rust a,
.sidebar h2 a, .sidebar h2 a,
.sidebar h3 a, .sidebar h3 a,
.mobile-topbar h2 a, .mobile-topbar h2 a,
h1.fqn a, h1 a,
.search-results a, .search-results a,
.module-item .stab, .module-item .stab,
.import-item .stab, .import-item .stab,
.result-name .primitive > i, .result-name .keyword > i, .result-name .primitive > i, .result-name .keyword > i,
.content .method .where, .method .where,
.content .fn .where, .fn .where,
.content .where.fmt-newline { .where.fmt-newline {
color: var(--main-color); color: var(--main-color);
} }
.content span.enum, .content a.enum, span.enum, a.enum,
.content span.struct, .content a.struct, span.struct, a.struct,
.content span.union, .content a.union, span.union, a.union,
.content span.primitive, .content a.primitive, span.primitive, a.primitive,
.content span.type, .content a.type, span.type, a.type,
.content span.foreigntype, .content a.foreigntype { span.foreigntype, a.foreigntype {
color: var(--type-link-color); color: var(--type-link-color);
} }
.content span.trait, .content a.trait, span.trait, a.trait,
.content span.traitalias, .content a.traitalias { span.traitalias, a.traitalias {
color: var(--trait-link-color); color: var(--trait-link-color);
} }
.content span.associatedtype, .content a.associatedtype, span.associatedtype, a.associatedtype,
.content span.constant, .content a.constant, span.constant, a.constant,
.content span.static, .content a.static { span.static, a.static {
color: var(--assoc-item-link-color); color: var(--assoc-item-link-color);
} }
.content span.fn, .content a.fn, span.fn, a.fn,
.content .fnname, .fnname,
.content span.method, .content a.method, span.method, a.method,
.content span.tymethod, .content a.tymethod { span.tymethod, a.tymethod {
color: var(--function-link-color); color: var(--function-link-color);
} }
.content span.attr, .content a.attr, span.attr, a.attr,
.content span.derive, .content a.derive, span.derive, a.derive,
.content span.macro, .content a.macro { span.macro, a.macro {
color: var(--macro-link-color); color: var(--macro-link-color);
} }
.content span.mod, .content a.mod, .block a.current.mod { span.mod, a.mod {
color: var(--mod-link-color); color: var(--mod-link-color);
} }
.content span.keyword, .content a.keyword { span.keyword, a.keyword {
color: var(--keyword-link-color); color: var(--keyword-link-color);
} }
@ -685,9 +685,9 @@ pre, .rustdoc.source .example-wrap {
} }
/* Shift "where ..." part of method or fn definition down a line */ /* Shift "where ..." part of method or fn definition down a line */
.content .method .where, .method .where,
.content .fn .where, .fn .where,
.content .where.fmt-newline { .where.fmt-newline {
display: block; display: block;
font-size: 0.875rem; font-size: 0.875rem;
} }

View file

@ -56,7 +56,7 @@ input:focus + .slider {
h1, h2, h3, h4 { h1, h2, h3, h4 {
color: white; color: white;
} }
h1.fqn a { h1 a {
color: #fff; color: #fff;
} }
h4 { h4 {