forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#91102 - jsha:theme-anchor, r=GuillaumeGomez
Set color for <a> in a more straightforward way. Previously, we set the default color for <a> tags to black, and then had an override with a bunch of not() clauses to set anchors in docblocks to blue. Instead, we should set the default color for <a> to blue (or equivalent in other themes), and override it for places like the sidebar or search results, where we don't want them to be styled as links. Demo at https://rustdoc.crud.net/jsha/theme-anchor/std/string/struct.String.html. This should result in no visible changes. r? `@GuillaumeGomez`
- Loading branch information
Showing
6 changed files
with
60 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html | ||
|
||
// Set the theme to light. | ||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} | ||
// We reload the page so the local storage settings are being used. | ||
reload: | ||
|
||
assert-css: ("#toggle-all-docs", {"color": "rgba(0, 0, 0, 0)"}) | ||
assert-css: (".fqn .in-band a:nth-of-type(1)", {"color": "rgba(0, 0, 0, 0)"}) | ||
assert-css: (".fqn .in-band a:nth-of-type(2)", {"color": "rgba(0, 0, 0, 0)"}) | ||
assert-css: (".srclink", {"color": "rgba(0, 0, 0, 0)"}) | ||
assert-css: (".srclink", {"color": "rgba(0, 0, 0, 0)"}) | ||
|
||
assert-css: ("#top-doc-prose-title", {"color": "rgba(0, 0, 0, 0)"}) | ||
|
||
assert-css: (".sidebar a", {"color": "rgba(0, 0, 0, 0)"}) | ||
assert-css: (".in-band a", {"color": "rgba(0, 0, 0, 0)"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters