Rollup merge of #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`
This commit is contained in:
commit
cb7776758c
6 changed files with 62 additions and 34 deletions
17
src/test/rustdoc-gui/anchors.goml
Normal file
17
src/test/rustdoc-gui/anchors.goml
Normal file
|
|
@ -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)"})
|
||||
Loading…
Add table
Add a link
Reference in a new issue