277bb6653b
Migrate sidebar links color to CSS variables and unify themes with ayu Part of https://github.com/rust-lang/rust/pull/98460. This PR does two things: 1. Migrate more theme CSS rules toward CSS variables. 2. Remove `a.current` specific colors depending on the kind of the item behind the link. The `ayu` theme was already doing it this way and I think it makes much more sense like this. You can test it [here](https://rustdoc.crud.net/imperio/sidebar-links-color/lib2/struct.Foo.html) by hovering other module's items in the sidebar (or check the selector `a.current`). cc `@jsha` 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 src/test/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 src/test/rustdoc-gui --stage 1 --test-args --no-headless
To see the supported options, use --help
.
Important to be noted: if the chromium instance crashes when you run it, you might need to
use --no-sandbox
to make it work:
$ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --no-sandbox