Skip to content

Commit

Permalink
fix: add faster tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme committed Jul 2, 2024
1 parent b0f38d0 commit a0349e2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions website/src/components/Toolbars.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,31 @@ watch(() => props.state, state => {
.floating:active {
color: var(--vp-c-brand);
}
@media only screen and (min-width: 780px) {
[title] {
position: relative;
}
[title]:after {
content: attr(title);
position: absolute;
left: -10%;
bottom: 50%;
background-color: rgba(0, 0, 0, 0.5);
padding: 0.25em 0.5em;
font-size: 10px;
width: max-content;
opacity: 0;
transform: translate(-100%, 50%);
transition: 0.2s;
border-radius: 5px;
}
[title]:hover:after {
opacity: 1;
}
}
.switch {
display: none;
border-radius: 5px 5px 0px 0px;
Expand Down

0 comments on commit a0349e2

Please sign in to comment.