refactor(youtube): cleanup and misc changes (#745)

Co-authored-by: uncenter <[email protected]>
This commit is contained in:
Isabelanduncenter authored and GitHub committed 2024-04-02 22:19:31 +01:00
1 parent a75a4f91a2
commit 0cdbd61d26
1 file changed
+63 -94
+63 -94
View File
@@ -2,7 +2,7 @@
@name YouTube Catppuccin @name YouTube Catppuccin
@namespace github.com/catppuccin/userstyles/styles/youtube @namespace github.com/catppuccin/userstyles/styles/youtube
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/youtube @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/youtube
@version 3.5.2 @version 3.5.3
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/youtube/catppuccin.user.css @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/youtube/catppuccin.user.css
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ayoutube @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ayoutube
@description Soothing pastel theme for YouTube @description Soothing pastel theme for YouTube
@@ -56,10 +56,8 @@
@crust: @catppuccin[@@lookup][@crust]; @crust: @catppuccin[@@lookup][@crust];
@accent-color: @catppuccin[@@lookup][@@accent]; @accent-color: @catppuccin[@@lookup][@@accent];
/* apply everywhere */
&, &,
[dark], [dark],
html,
html[system-icons][dark], html[system-icons][dark],
html[system-icons] [dark], html[system-icons] [dark],
html[darker-dark-theme][dark], html[darker-dark-theme][dark],
@@ -316,11 +314,7 @@
null null
) !important; ) !important;
/* Tooltip */ /* Links */
--paper-tooltip-background: @overlay0 !important;
--paper-tooltip-text-color: @text !important;
/* links */
--yt-endpoint-color: @accent-color !important; --yt-endpoint-color: @accent-color !important;
--yt-endpoint-visited-color: @accent-color !important; --yt-endpoint-visited-color: @accent-color !important;
--yt-endpoint-hover-color: @accent-color !important; --yt-endpoint-hover-color: @accent-color !important;
@@ -333,7 +327,6 @@
--sb-red-bg-color: @accent-color !important; --sb-red-bg-color: @accent-color !important;
} }
/* general colors */
&:not(.style-scope) { &:not(.style-scope) {
--primary-text-color: @text !important; --primary-text-color: @text !important;
--primary-background-color: @base !important; --primary-background-color: @base !important;
@@ -361,17 +354,8 @@
--dark-theme-divider-color: @overlay0 !important; --dark-theme-divider-color: @overlay0 !important;
} }
/* logo */
ytd-topbar-logo-renderer.style-scope a svg > g, & when (@logo = 0) {
svg.ytd-consent-bump-v2-lightbox > g:nth-child(1) {
path[fill="#FF0000"] {
fill: @accent-color !important;
}
path[fill="white"] {
fill: @base !important;
}
}
& when (@logo =0) {
ytd-topbar-logo-renderer, ytd-topbar-logo-renderer,
svg.ytd-consent-bump-v2-lightbox { svg.ytd-consent-bump-v2-lightbox {
display: none; display: none;
@@ -435,7 +419,6 @@
} }
yt-live-chat-renderer { yt-live-chat-renderer {
--yt-emoji-picker-renderer-height: 180px;
--yt-button-default-text-color: @text !important; --yt-button-default-text-color: @text !important;
--yt-button-default-background-color: @base !important; --yt-button-default-background-color: @base !important;
--yt-button-dark-text-color: @base !important; --yt-button-dark-text-color: @base !important;
@@ -470,15 +453,12 @@
background: @overlay0 !important; background: @overlay0 !important;
} }
/* volume bar */ /* volume slider */
.ytp-volume-slider-handle { .ytp-volume-slider-handle {
background: @accent-color !important; background: @accent-color !important;
&::before { &::before {
background: @accent-color !important; background: @accent-color !important;
} }
&::after {
z-index: -1;
}
} }
/* new videos dot */ /* new videos dot */
@@ -522,33 +502,25 @@
} }
} }
.ytp-panel-menu { .ytp-panel-menu, .ytp-panel-header, .ytp-panel-footer, .ytp-menuitem-label,.ytp-menuitem-content, .ytp-menuitem-label-count, .ytp-menu-label-secondary {
color: @text; color: @text;
& .ytp-menuitem:not(:last-child) svg > path {
fill: @text;
}
& .ytp-menuitem:last-child svg:last-child {
fill: @text;
}
} }
.ytp-right-controls svg path, .ytp-menuitem svg > path:not([fill="none"]) {
.ytp-svg-fill { fill: @text !important;
fill: #fff !important;
} }
.ytp-time-current, .ytp-menuitem[aria-haspopup="true"] .ytp-menuitem-content {
.ytp-time-separator, @svg: escape('<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32" version="1.1"><path d="m12.59 20.34 4.58-4.59-4.58-4.59L14 9.75l6 6-6 6z" fill="@{text}"/></svg>');
.ytp-time-duration, background-image: url("data:image/svg+xml,@{svg}")
.ytp-menu-label-secondary,
.ytp-menuitem-label-count {
color: #fff;
} }
.ytp-panel-back-button {
.ytp-tooltip:not([aria-hidden="true"]) { @svg: escape('<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 32 32" version="1.1"><path d="m19.41 20.09-4.58-4.59 4.58-4.59L18 9.5l-6 6 6 6z" fill="@{text}"/></svg>');
color: @text; background-image: url("data:image/svg+xml,@{svg}")
}
.ytp-menuitem[role="menuitemradio"][aria-checked="true"] .ytp-menuitem-label {
@svg: escape('<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" version="1.1"><path d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z" fill="@{text}"/></svg>');
background-image: url("data:image/svg+xml,@{svg}")
} }
.style-scope.ytd-thumbnail-overlay-toggle-button-renderer:hover { .style-scope.ytd-thumbnail-overlay-toggle-button-renderer:hover {
@@ -615,7 +587,7 @@
} }
} }
/* text color */ /* search results */
.gsfs { .gsfs {
color: @text !important; color: @text !important;
} }
@@ -744,7 +716,6 @@
} }
.iv-card-content > :first-child, .iv-card-content > :first-child,
.html5-video-player a,
.iv-card h2, .iv-card h2,
.ytp-cards-teaser .ytp-cards-teaser-text { .ytp-cards-teaser .ytp-cards-teaser-text {
color: @text !important; color: @text !important;
@@ -753,6 +724,7 @@
/* Player tooltip background */ /* Player tooltip background */
.ytp-tooltip-text { .ytp-tooltip-text {
background: @surface0 !important; background: @surface0 !important;
color: @text;
} }
.iv-card:hover .iv-card-primary-link, .iv-card:hover .iv-card-primary-link,
@@ -762,6 +734,7 @@
.ytp-popup { .ytp-popup {
background: @surface0 !important; background: @surface0 !important;
text-shadow: none;
} }
tp-yt-paper-dialog { tp-yt-paper-dialog {
@@ -816,8 +789,6 @@
--ytd-author-comment-badge-background-color: @surface0 !important; --ytd-author-comment-badge-background-color: @surface0 !important;
--ytd-author-comment-badge-name-color: @text !important; --ytd-author-comment-badge-name-color: @text !important;
--ytd-author-comment-badge-icon-color: @text !important; --ytd-author-comment-badge-icon-color: @text !important;
padding-right: 6px;
padding-left: 8px;
} }
/* ambient mode */ /* ambient mode */
@@ -942,28 +913,51 @@
color: @accent-color !important; color: @accent-color !important;
} }
/* hopefully temporary (buttons) */ /* theme short - we do it accent beacuse anything else is hard to read */
.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--tonal { reel-player-header-renderer #text.complex-string.ytd-channel-name a,
background-color: @surface0; reel-player-header-renderer {
color: @text; color: @accent-color;
&:hover {
background-color: @surface1;
}
} }
.yt-spec-button-shape-next--call-to-action.yt-spec-button-shape-next--filled {
color: @crust; /* buttons */
background-color: @accent-color; .yt-spec-touch-feedback-shape--touch-response
&:hover { .yt-spec-touch-feedback-shape__fill {
background-color: darken(@accent-color, 20); background-color: @text;
}
.yt-spec-button-shape-next--mono {
&.yt-spec-button-shape-next--outline, &.yt-spec-button-shape-next--text {
color: @text;
&:hover {
background-color: @surface0;
}
}
&.yt-spec-button-shape-next--tonal {
color: @text;
background-color: @surface0;
}
&.yt-spec-button-shape-next--outline {
border-color: @surface2 !important;
}
&.yt-spec-button-shape-next--filled {
color: @crust;
background-color: @accent-color;
} }
} }
.yt-spec-touch-feedback-shape--touch-response .yt-spec-touch-feedback-shape--touch-response
.yt-spec-touch-feedback-shape__stroke { .yt-spec-touch-feedback-shape__stroke {
border-color: @surface1; border-color: @surface1;
} }
.yt-spec-touch-feedback-shape--touch-response-inverse .yt-spec-button-shape-next--overlay.yt-spec-button-shape-next--filled {
.yt-spec-touch-feedback-shape__stroke { color: @crust;
border-color: @accent-color; background-color: @accent-color;
}
.yt-spec-touch-feedback-shape--overlay-touch-response-inverse
.yt-spec-touch-feedback-shape__fill {
background-color: @accent-color;
}
.yt-spec-touch-feedback-shape--overlay-touch-response
.yt-spec-touch-feedback-shape__fill {
background-color: @text;
} }
ytd-guide-section-renderer.style-scope:nth-child(3) > div:nth-child(2), ytd-guide-section-renderer.style-scope:nth-child(3) > div:nth-child(2),
@@ -1029,49 +1023,26 @@
[fill="#F00"], [fill="#F00"],
[fill="red"], [fill="red"],
[fill="#FF0000"] { [fill="#FF0000"] {
fill: @accent-color; fill: @accent-color !important;
} }
svg > g > polygon[fill="#fff"] { [fill="white"], [fill="#fff"] {
fill: @base !important; fill: @base !important;
} }
.yt-spec-button-shape-next--call-to-action.yt-spec-button-shape-next--text {
color: @accent-color;
&:hover {
background-color: fadeout(@accent-color, 90);
}
}
.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--outline,
.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--text {
color: @text;
&:hover {
background-color: @surface0;
}
}
.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--outline {
border-color: @surface0;
}
/* Scrollbar */
::-webkit-scrollbar { ::-webkit-scrollbar {
width: @scrollbar_width !important; width: @scrollbar_width !important;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: @base !important; background: @base !important;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: @accent-color !important; background: @accent-color !important;
} }
/* text highlight */
::selection { ::selection {
background: fadeout(@accent-color, 80%) !important; background: @accent-color !important;
color: @text !important; color: @base !important;
} }
} }
} }
@@ -1163,7 +1134,6 @@
color: @text !important; color: @text !important;
} }
/* text highlight */
::selection { ::selection {
background: fadeout(@accent-color, 80%) !important; background: fadeout(@accent-color, 80%) !important;
color: @text !important; color: @text !important;
@@ -1342,7 +1312,6 @@
color: @text !important; color: @text !important;
} }
/* text highlight */
::selection { ::selection {
background: fadeout(@accent-color, 80%) !important; background: fadeout(@accent-color, 80%) !important;
color: @text !important; color: @text !important;