mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 09:23:31 +00:00
[rustdoc] Change table odd table rows background color to not make it the same as inline code Fixes rust-lang/rust#159234. Follow-up of https://github.com/rust-lang/rust/pull/105442. It now looks like this: <img width="418" height="163" alt="Screenshot From 2026-08-03 15-21-15" src="https://github.com/user-attachments/assets/97d2ae1c-e167-4cc0-8daf-d8937397faed" /> <img width="418" height="163" alt="Screenshot From 2026-08-03 15-21-21" src="https://github.com/user-attachments/assets/8916a49d-2496-4045-820a-12f10f18d81b" /> <img width="418" height="163" alt="Screenshot From 2026-08-03 15-21-25" src="https://github.com/user-attachments/assets/b44b3b3f-8ec7-4fea-b783-aedf1b452249" /> For the light theme, I had to make the inline code background darker so it would mix well with the alternative table rows background color. r? @notriddle
The tests present here are used to test the generated HTML from rustdoc. The goal is to prevent unsound/unexpected GUI changes.
This is using the browser-ui-test framework to do so. It works as follows:
It wraps puppeteer to send commands to a web browser in order to navigate and test what's being currently displayed in the web page.
You can find more information and its documentation in its repository.
If you need to have more information on the tests run, you can use --test-args:
$ ./x.py test tests/rustdoc-gui --stage 1 --test-args --debug
If you don't want to run in headless mode (helpful to debug sometimes), you can use
--no-headless:
$ ./x.py test tests/rustdoc-gui --stage 1 --test-args --no-headless
To see the supported options, use --help.