mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 02:43:45 +00:00
Migrate rust logo filter to CSS variables
This commit is contained in:
parent
1e1e5b8d98
commit
24d86a1c08
@ -378,6 +378,10 @@ img {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.rust-logo {
|
||||
filter: var(--rust-logo-filter);
|
||||
}
|
||||
|
||||
.sidebar, .mobile-topbar, .sidebar-menu-toggle {
|
||||
background-color: var(--sidebar-background-color);
|
||||
}
|
||||
|
@ -63,6 +63,10 @@ Original by Dempfi (https://github.com/dempfi/ayu)
|
||||
--test-arrow-background-color: rgba(57, 175, 215, 0.09);
|
||||
--test-arrow-hover-color: #c5c5c5;
|
||||
--test-arrow-hover-background-color: rgba(57, 175, 215, 0.368);
|
||||
--rust-logo-filter: drop-shadow(1px 0 0px #fff)
|
||||
drop-shadow(0 1px 0 #fff)
|
||||
drop-shadow(-1px 0 0 #fff)
|
||||
drop-shadow(0 -1px 0 #fff);
|
||||
}
|
||||
|
||||
.slider {
|
||||
@ -104,13 +108,6 @@ pre, .rustdoc.source .example-wrap {
|
||||
color: #e6e1cf;
|
||||
}
|
||||
|
||||
.rust-logo {
|
||||
filter: drop-shadow(1px 0 0px #fff)
|
||||
drop-shadow(0 1px 0 #fff)
|
||||
drop-shadow(-1px 0 0 #fff)
|
||||
drop-shadow(0 -1px 0 #fff);
|
||||
}
|
||||
|
||||
.sidebar .current,
|
||||
.sidebar a:hover {
|
||||
color: #ffb44c;
|
||||
|
@ -58,6 +58,10 @@
|
||||
--test-arrow-background-color: rgba(78, 139, 202, 0.2);
|
||||
--test-arrow-hover-color: #dedede;
|
||||
--test-arrow-hover-background-color: #4e8bca;
|
||||
--rust-logo-filter: drop-shadow(1px 0 0px #fff)
|
||||
drop-shadow(0 1px 0 #fff)
|
||||
drop-shadow(-1px 0 0 #fff)
|
||||
drop-shadow(0 -1px 0 #fff);
|
||||
}
|
||||
|
||||
.slider {
|
||||
@ -70,13 +74,6 @@ input:focus + .slider {
|
||||
box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
|
||||
}
|
||||
|
||||
.rust-logo {
|
||||
filter: drop-shadow(1px 0 0px #fff)
|
||||
drop-shadow(0 1px 0 #fff)
|
||||
drop-shadow(-1px 0 0 #fff)
|
||||
drop-shadow(0 -1px 0 #fff)
|
||||
}
|
||||
|
||||
.content .item-info::before { color: #ccc; }
|
||||
|
||||
body.source .example-wrap pre.rust a {
|
||||
|
@ -58,6 +58,7 @@
|
||||
--test-arrow-background-color: rgba(78, 139, 202, 0.2);
|
||||
--test-arrow-hover-color: #f5f5f5;
|
||||
--test-arrow-hover-background-color: #4e8bca;
|
||||
--rust-logo-filter: initial;
|
||||
}
|
||||
|
||||
.slider {
|
||||
@ -70,12 +71,6 @@ input:focus + .slider {
|
||||
box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
|
||||
}
|
||||
|
||||
.rust-logo {
|
||||
/* This rule exists to force other themes to explicitly style the logo.
|
||||
* Rustdoc has a custom linter for this purpose.
|
||||
*/
|
||||
}
|
||||
|
||||
.content .item-info::before { color: #ccc; }
|
||||
|
||||
body.source .example-wrap pre.rust a {
|
||||
|
Loading…
Reference in New Issue
Block a user