about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-12-29 12:10:24 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-12-29 12:10:24 +0100
commit5494da23afe9a8ff178475c6bd9d3efb5ddac645 (patch)
treeb2548a8b21c71b8dc944f20d5308b61b16124e20
parentaa20f885c4abaa8a13f0adcc5d5738b895cc84a8 (diff)
downloadrust-5494da23afe9a8ff178475c6bd9d3efb5ddac645.tar.gz
rust-5494da23afe9a8ff178475c6bd9d3efb5ddac645.zip
Migrate more scraped examples CSS rules to CSS variables
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css8
-rw-r--r--src/librustdoc/html/static/css/themes/ayu.css12
-rw-r--r--src/librustdoc/html/static/css/themes/dark.css12
-rw-r--r--src/librustdoc/html/static/css/themes/light.css12
4 files changed, 20 insertions, 24 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 31bc8c9129d..1a75610310b 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1965,6 +1965,14 @@ in storage.js
 .scraped-example .example-wrap .rust span.highlight.focus {
 	background: var(--scrape-example-code-line-highlight-focus);
 }
+.scraped-example-list .scrape-help {
+	border-color: var(--scrape-example-help-border-color);
+	color: var(--scrape-example-help-color);
+}
+.scraped-example-list .scrape-help:hover {
+	border-color: var(--scrape-example-help-hover-border-color);
+	color: var(--scrape-example-help-hover-color);
+}
 
 .more-examples-toggle {
 	max-width: calc(100% + 25px);
diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css
index 3d002505422..979e7e0f999 100644
--- a/src/librustdoc/html/static/css/themes/ayu.css
+++ b/src/librustdoc/html/static/css/themes/ayu.css
@@ -93,6 +93,10 @@ Original by Dempfi (https://github.com/dempfi/ayu)
 	--scrape-example-toggle-line-hover-background: #c5c5c5;
 	--scrape-example-code-line-highlight: rgb(91, 59, 1);
 	--scrape-example-code-line-highlight-focus: rgb(124, 75, 15);
+	--scrape-example-help-border-color: #aaa;
+	--scrape-example-help-color: #eee;
+	--scrape-example-help-hover-border-color: #fff;
+	--scrape-example-help-hover-color: #fff;
 }
 
 h1, h2, h3, h4 {
@@ -200,14 +204,6 @@ above the `@media (max-width: 700px)` rules due to a bug in the css checker */
 	color: #ffb44c;
 }
 
-.scraped-example-list .scrape-help {
-	border-color: #aaa;
-	color: #eee;
-}
-.scraped-example-list .scrape-help:hover {
-	border-color: white;
-	color: white;
-}
 .scraped-example:not(.expanded) .code-wrapper::before {
 	background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
 }
diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css
index b88eeedddf3..fb15863b027 100644
--- a/src/librustdoc/html/static/css/themes/dark.css
+++ b/src/librustdoc/html/static/css/themes/dark.css
@@ -88,6 +88,10 @@
 	--scrape-example-toggle-line-hover-background: #c5c5c5;
 	--scrape-example-code-line-highlight: rgb(91, 59, 1);
 	--scrape-example-code-line-highlight-focus: rgb(124, 75, 15);
+	--scrape-example-help-border-color: #aaa;
+	--scrape-example-help-color: #eee;
+	--scrape-example-help-hover-border-color: #fff;
+	--scrape-example-help-hover-color: #fff;
 }
 
 #search-tabs > button:not(.selected) {
@@ -100,14 +104,6 @@
 	background-color: #353535;
 }
 
-.scraped-example-list .scrape-help {
-	border-color: #aaa;
-	color: #eee;
-}
-.scraped-example-list .scrape-help:hover {
-	border-color: white;
-	color: white;
-}
 .scraped-example:not(.expanded) .code-wrapper::before {
 	background: linear-gradient(to bottom, rgba(53, 53, 53, 1), rgba(53, 53, 53, 0));
 }
diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css
index fff59d4e9c9..053fa78d1dc 100644
--- a/src/librustdoc/html/static/css/themes/light.css
+++ b/src/librustdoc/html/static/css/themes/light.css
@@ -85,6 +85,10 @@
 	--scrape-example-toggle-line-hover-background: #999;
 	--scrape-example-code-line-highlight: #fcffd6;
 	--scrape-example-code-line-highlight-focus: #f6fdb0;
+	--scrape-example-help-border-color: #555;
+	--scrape-example-help-color: #333;
+	--scrape-example-help-hover-border-color: #000;
+	--scrape-example-help-hover-color: #000;
 }
 
 #search-tabs > button:not(.selected) {
@@ -97,14 +101,6 @@
 	border-top-color: #0089ff;
 }
 
-.scraped-example-list .scrape-help {
-	border-color: #555;
-	color: #333;
-}
-.scraped-example-list .scrape-help:hover {
-	border-color: black;
-	color: black;
-}
 .scraped-example:not(.expanded) .code-wrapper::before {
 	background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
 }