about summary refs log tree commit diff
path: root/tests/rustdoc-gui/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-05 18:58:56 +0200
committerGitHub <noreply@github.com>2024-09-05 18:58:56 +0200
commit9be97ae8e29b99a030a327cdb50e1997a4ff3470 (patch)
tree8b78e601cf29af214f649a8b176c342f5f846e10 /tests/rustdoc-gui/src
parent15e7a67b502b2f4729ef39d7a517fe9e762bd438 (diff)
parent7157f98cb481766873306238185fb5d4522a903a (diff)
downloadrust-9be97ae8e29b99a030a327cdb50e1997a4ff3470.tar.gz
rust-9be97ae8e29b99a030a327cdb50e1997a4ff3470.zip
Rollup merge of #129796 - GuillaumeGomez:unify-code-examples, r=notriddle
Unify scraped examples with other code examples

Fixes #129763.

This first PR both fixes #129763 but also unifies buttons display for code examples:

![image](https://github.com/user-attachments/assets/c8475945-dcc3-4c25-8d7d-1659f85301c8)

You can test it [here](https://rustdoc.crud.net/imperio/unify-code-examples/doc/scrape_examples/fn.test.html) and [here](https://rustdoc.crud.net/imperio/unify-code-examples/doc/scrape_examples/fn.test_many.html).

I'm planning to send a follow-up to make the buttons generated in JS directly (or I can do it in this PR directly if you prefer).

cc ```@willcrichton```
r? ```@notriddle```
Diffstat (limited to 'tests/rustdoc-gui/src')
-rw-r--r--tests/rustdoc-gui/src/theme_css/custom-theme.css2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/src/theme_css/custom-theme.css b/tests/rustdoc-gui/src/theme_css/custom-theme.css
index a56c31ab9d2..366f09f22b2 100644
--- a/tests/rustdoc-gui/src/theme_css/custom-theme.css
+++ b/tests/rustdoc-gui/src/theme_css/custom-theme.css
@@ -23,6 +23,8 @@
 	--copy-path-button-color: #999;
 	--copy-path-img-filter: invert(50%);
 	--copy-path-img-hover-filter: invert(35%);
+        --code-example-button-color: #7f7f7f;
+	--code-example-button-hover-color: #a5a5a5;
 	--codeblock-error-hover-color: rgb(255, 0, 0);
 	--codeblock-error-color: rgba(255, 0, 0, .5);
 	--codeblock-ignore-hover-color: rgb(255, 142, 0);