Skip to content

Commit

Permalink
Show video list buttons on hover or focus (#3954)
Browse files Browse the repository at this point in the history
* Implement external player icon and favorites icon only appearing after hover/focus

As a way of cleaning up the look of videos, only shows the video icons on hover or focus. This is for all purposes a very 'free' change that I would opine makes FreeTube appear much cleaner.

* Implement video list settings button only appearing on hover/focus

Same idea as for the favorites & external player icons; much cleaner look without any sizable 'cost' to boot.

* Ensure video list buttons always show on devices without hover (e.g., mobile)

* Remove user-select lines (already in another PR) & one extraneous line
  • Loading branch information
kommunarr committed Aug 28, 2023
1 parent 0b6edd6 commit c32b84c
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions src/renderer/scss-partials/_ft-list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,13 @@ $watched-transition-duration: 0.5s;
justify-self: left;
margin-bottom: 4px;
margin-left: 4px;
opacity: $thumbnail-overlay-opacity;
}

.favoritesIcon {
font-size: 17px;
justify-self: right;
margin-right: 3px;
margin-top: 3px;
opacity: $thumbnail-overlay-opacity;
height: fit-content;
}

Expand Down Expand Up @@ -298,6 +296,35 @@ $watched-transition-duration: 0.5s;
margin-top: 8px;
}
}

.favoritesIcon,
.externalPlayerIcon {
opacity: $thumbnail-overlay-opacity;
}

@media (hover: hover) {
&:hover .favoritesIcon,
&:hover .externalPlayerIcon,
&:focus-within .favoritesIcon,
&:focus-within .externalPlayerIcon {
visibility: visible;
opacity: $thumbnail-overlay-opacity;
}

&:hover .optionsButton,
&:focus-within .optionsButton {
visibility: visible;
opacity: 1;
}

.favoritesIcon,
.externalPlayerIcon,
.optionsButton {
visibility: none;
opacity: 0;
transition: visibility 0s, opacity 0.2s linear;
}
}
}

.videoWatched,
Expand Down

0 comments on commit c32b84c

Please sign in to comment.