Rollup merge of #92764 - GuillaumeGomez:fix-rust-logo-style, r=jsha
Fix rust logo style The style on the rust logo is currently broken:  With this fix, we're back to normal:  I also used a GUI test to prevent future silent regressions. r? ```@jsha```
This commit is contained in:
commit
05dd1e4a2b
4 changed files with 81 additions and 3 deletions
|
@ -61,7 +61,7 @@ pre, .rustdoc.source .example-wrap {
|
|||
background-color: #14191f;
|
||||
}
|
||||
|
||||
.rust-logo > img {
|
||||
.rust-logo {
|
||||
filter: drop-shadow(1px 0 0px #fff)
|
||||
drop-shadow(0 1px 0 #fff)
|
||||
drop-shadow(-1px 0 0 #fff)
|
||||
|
|
|
@ -32,7 +32,7 @@ pre, .rustdoc.source .example-wrap {
|
|||
background-color: #505050;
|
||||
}
|
||||
|
||||
.rust-logo > img {
|
||||
.rust-logo {
|
||||
filter: drop-shadow(1px 0 0px #fff)
|
||||
drop-shadow(0 1px 0 #fff)
|
||||
drop-shadow(-1px 0 0 #fff)
|
||||
|
|
|
@ -43,7 +43,7 @@ pre, .rustdoc.source .example-wrap {
|
|||
scrollbar-color: rgba(36, 37, 39, 0.6) #d9d9d9;
|
||||
}
|
||||
|
||||
.rust-logo > img {
|
||||
.rust-logo {
|
||||
/* No need for a border in here! */
|
||||
}
|
||||
|
||||
|
|
78
src/test/rustdoc-gui/rust-logo.goml
Normal file
78
src/test/rustdoc-gui/rust-logo.goml
Normal file
|
@ -0,0 +1,78 @@
|
|||
// This test ensures that the correct style is applied to the rust logo in the sidebar.
|
||||
goto: file://|DOC_PATH|/test_docs/index.html
|
||||
|
||||
// First we start with the dark theme.
|
||||
local-storage: {
|
||||
"rustdoc-theme": "dark",
|
||||
"rustdoc-preferred-dark-theme": "dark",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
reload:
|
||||
|
||||
assert-css: (
|
||||
".rust-logo",
|
||||
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
|
||||
)
|
||||
|
||||
// In the source view page now.
|
||||
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
|
||||
|
||||
local-storage: {
|
||||
"rustdoc-theme": "dark",
|
||||
"rustdoc-preferred-dark-theme": "dark",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
reload:
|
||||
|
||||
assert-css: (
|
||||
".rust-logo",
|
||||
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
|
||||
)
|
||||
|
||||
// Then with the ayu theme.
|
||||
local-storage: {
|
||||
"rustdoc-theme": "ayu",
|
||||
"rustdoc-preferred-dark-theme": "ayu",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
reload:
|
||||
|
||||
assert-css: (
|
||||
".rust-logo",
|
||||
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
|
||||
)
|
||||
|
||||
// In the source view page now.
|
||||
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
|
||||
|
||||
local-storage: {
|
||||
"rustdoc-theme": "ayu",
|
||||
"rustdoc-preferred-dark-theme": "ayu",
|
||||
"rustdoc-use-system-theme": "false",
|
||||
}
|
||||
reload:
|
||||
|
||||
assert-css: (
|
||||
".rust-logo",
|
||||
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
|
||||
)
|
||||
|
||||
// And finally with the light theme.
|
||||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
assert-css: (
|
||||
".rust-logo",
|
||||
{"filter": "none"},
|
||||
)
|
||||
|
||||
// In the source view page now.
|
||||
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html
|
||||
|
||||
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||
reload:
|
||||
|
||||
assert-css: (
|
||||
".rust-logo",
|
||||
{"filter": "none"},
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue