Migrate tooltip style to CSS variables

This commit is contained in:
Guillaume Gomez 2022-11-17 14:31:34 +01:00
parent 7c75fe4c85
commit 16b55903ee
4 changed files with 11 additions and 31 deletions

View file

@ -1162,6 +1162,8 @@ pre.rust .doccomment {
width: max-content;
top: -2px;
z-index: 1;
background-color: var(--tooltip-background-color);
color: var(--tooltip-color);
}
.example-wrap .tooltip::before {
@ -1170,10 +1172,10 @@ pre.rust .doccomment {
top: 50%;
left: 16px;
margin-top: -5px;
border-width: 5px;
border-style: solid;
display: none;
z-index: 1;
border: 5px solid transparent;
border-right-color: var(--tooltip-background-color);
}
.example-wrap.ignore .tooltip::after {

View file

@ -65,6 +65,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--test-arrow-hover-background-color: rgba(57, 175, 215, 0.368);
--target-background-color: rgba(255, 236, 164, 0.06);
--target-border-color: rgba(255, 180, 76, 0.85);
--tooltip-background-color: #314559;
--tooltip-color: #c5c5c5;
--rust-logo-filter: drop-shadow(1px 0 0px #fff)
drop-shadow(0 1px 0 #fff)
drop-shadow(-1px 0 0 #fff)
@ -160,15 +162,6 @@ details.rustdoc-toggle > summary::before {
color: #788797;
}
.tooltip::after {
background-color: #314559;
color: #c5c5c5;
}
.tooltip::before {
border-color: transparent #314559 transparent transparent;
}
#titles > button.selected {
background-color: #141920 !important;
border-bottom: 1px solid #ffb44c !important;

View file

@ -60,6 +60,8 @@
--test-arrow-hover-background-color: #4e8bca;
--target-background-color: #494a3d;
--target-border-color: #bb7410;
--tooltip-background-color: #000;
--tooltip-color: #fff;
--rust-logo-filter: drop-shadow(1px 0 0px #fff)
drop-shadow(0 1px 0 #fff)
drop-shadow(-1px 0 0 #fff)
@ -82,16 +84,6 @@ details.rustdoc-toggle > summary::before {
filter: invert(100%);
}
.tooltip::after {
background-color: #000;
color: #fff;
border-color: #000;
}
.tooltip::before {
border-color: transparent black transparent transparent;
}
#titles > button:not(.selected) {
background-color: #252525;
border-top-color: #252525;

View file

@ -58,8 +58,10 @@
--test-arrow-background-color: rgba(78, 139, 202, 0.2);
--test-arrow-hover-color: #f5f5f5;
--test-arrow-hover-background-color: #4e8bca;
--target-background-color: #fdFfd3;
--target-background-color: #fdffd3;
--target-border-color: #ad7c37;
--tooltip-background-color: #fdffd3;
--tooltip-color: #fff;
--rust-logo-filter: initial;
/* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
--crate-search-div-filter: invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg)
@ -75,15 +77,6 @@ body.source .example-wrap pre.rust a {
background: #eee;
}
.tooltip::after {
background-color: #000;
color: #fff;
}
.tooltip::before {
border-color: transparent black transparent transparent;
}
#titles > button:not(.selected) {
background-color: #e6e6e6;
border-top-color: #e6e6e6;