Skip to content

Commit

Permalink
Rollup merge of #105739 - GuillaumeGomez:migrate-jump-to-def-link-to-…
Browse files Browse the repository at this point in the history
…css-var, r=notriddle

Migrate Jump to def links background to CSS variable

It's already tested in `src/test/rustdoc-gui/jump-to-def-background.goml`.

r? `@notriddle`
  • Loading branch information
matthiaskrgr authored Dec 15, 2022
2 parents abfad27 + 8ae479a commit 0fbaf76
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 4 additions & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,10 @@ pre.rust .doccomment {
color: var(--code-highlight-doc-comment-color);
}

.rustdoc.source .example-wrap pre.rust a {
background: var(--codeblock-link-background);
}

.example-wrap.compile_fail,
.example-wrap.should_panic {
border-left: 2px solid var(--codeblock-error-color);
Expand Down
4 changes: 1 addition & 3 deletions src/librustdoc/html/static/css/themes/ayu.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--source-sidebar-background-selected: #14191f;
--source-sidebar-background-hover: #14191f;
--table-alt-row-background-color: #191f26;
--codeblock-link-background: #333;
}

h1, h2, h3, h4 {
Expand Down Expand Up @@ -154,9 +155,6 @@ pre, .rustdoc.source .example-wrap {
.sidebar h3 a {
color: white;
}
body.source .example-wrap pre.rust a {
background: #333;
}

.result-name .primitive > i, .result-name .keyword > i {
color: #788797;
Expand Down
5 changes: 1 addition & 4 deletions src/librustdoc/html/static/css/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@
--source-sidebar-background-selected: #333;
--source-sidebar-background-hover: #444;
--table-alt-row-background-color: #2A2A2A;
}

body.source .example-wrap pre.rust a {
background: #333;
--codeblock-link-background: #333;
}

#titles > button:not(.selected) {
Expand Down
5 changes: 1 addition & 4 deletions src/librustdoc/html/static/css/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@
--source-sidebar-background-selected: #fff;
--source-sidebar-background-hover: #e0e0e0;
--table-alt-row-background-color: #F5F5F5;
}

body.source .example-wrap pre.rust a {
background: #eee;
--codeblock-link-background: #eee;
}

#titles > button:not(.selected) {
Expand Down

0 comments on commit 0fbaf76

Please sign in to comment.