votes: show votes when hovering over post score.

Make it so you can hover over a post's score to see the list of public
upvotes. Also show the upvote count, the downvote count, and the upvote
ratio.
This commit is contained in:
evazion
2021-11-18 01:05:24 -06:00
parent a9997d0d2b
commit 5585d1f7d6
20 changed files with 262 additions and 58 deletions

View File

@@ -1,50 +1,6 @@
$tooltip-line-height: 16px;
$tooltip-body-height: $tooltip-line-height * 4; // 4 lines high.
@mixin thin-scrollbar {
&::-webkit-scrollbar {
width: 5px;
height: 5px;
}
&::-webkit-scrollbar-button {
width: 0;
height: 0;
}
&::-webkit-scrollbar-thumb {
background: var(--post-tooltip-scrollbar-background);
border: none;
border-radius: 0;
}
&::-webkit-scrollbar-thumb:hover {
background: var(--post-tooltip-scrollbar-thumb-color);
}
&::-webkit-scrollbar-thumb:active {
background: var(--post-tooltip-scrollbar-thumb-color);
}
&::-webkit-scrollbar-track {
background: var(--post-tooltip-scrollbar-track-background);
border: none;
border-radius: 0;
}
&::-webkit-scrollbar-track:hover {
background: var(--post-tooltip-scrollbar-track-background);
}
&::-webkit-scrollbar-track:active {
background: var(--post-tooltip-scrollbar-track-background);
}
&::-webkit-scrollbar-corner {
background: transparent;
}
}
.tippy-box[data-theme~="post-tooltip"] {
min-width: 20em;
max-width: 40em !important;
@@ -59,7 +15,6 @@ $tooltip-body-height: $tooltip-line-height * 4; // 4 lines high.
}
.post-tooltip-body {
@include thin-scrollbar;
max-height: $tooltip-body-height;
overflow-y: auto;
display: flex;