-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
239 lines (201 loc) · 6.16 KB
/
Copy pathstyles.css
File metadata and controls
239 lines (201 loc) · 6.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
.wl-custom-remove-btn {
background: transparent;
border: none;
cursor: pointer;
padding: 8px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
margin-right: 8px;
opacity: 0.7;
transition: opacity 0.1s; /* removed background-color transition to make it instant */
}
/* Default color for light mode */
.wl-custom-remove-btn svg {
fill: var(--yt-spec-icon-inactive, #0f0f0f);
width: 24px;
height: 24px;
}
/* Color for dark mode */
html[dark] .wl-custom-remove-btn svg {
fill: var(--yt-spec-icon-inactive, #f1f1f1);
}
/* Match native YouTube hover background instantly */
.wl-custom-remove-btn:hover {
background-color: var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
}
html[dark] .wl-custom-remove-btn:hover {
background-color: var(--yt-spec-10-percent-layer, rgba(255, 255, 255, 0.1));
}
/* Hide the button until the video row is hovered ONLY in the little playlist panel */
ytd-playlist-panel-video-renderer:not(:hover) .wl-custom-remove-btn {
opacity: 0;
pointer-events: none;
}
.wl-custom-remove-btn:active {
transform: scale(0.9);
}
/* Make sure the container aligns properly */
ytd-playlist-video-renderer #menu,
ytd-playlist-panel-video-renderer #menu {
display: flex !important;
flex-direction: row !important;
align-items: center !important;
}
/* Remove margin on the panel view since space is tight, let flex handle it */
ytd-playlist-panel-video-renderer .wl-custom-remove-btn {
margin-right: 0;
margin-left: 4px;
}
/* --- Add to Watch Later Button (matches 3-dots design) --- */
.wl-custom-add-btn {
background: transparent;
border: none;
cursor: pointer;
padding: 8px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
margin: 0;
opacity: 0.7;
pointer-events: auto;
transition: opacity 0.1s;
}
.wl-custom-add-btn:hover {
opacity: 1;
background-color: var(--yt-spec-10-percent-layer, rgba(0, 0, 0, 0.1));
}
html[dark] .wl-custom-add-btn:hover {
background-color: var(--yt-spec-10-percent-layer, rgba(255, 255, 255, 0.1));
}
.wl-custom-add-btn svg {
fill: var(--yt-spec-icon-inactive, #606060);
width: 24px;
height: 24px;
}
html[dark] .wl-custom-add-btn svg {
fill: var(--yt-spec-icon-inactive, #aaa);
}
.wl-custom-add-btn:active {
transform: scale(0.9);
}
/* On sidebar/compact videos, only show on hover (matches native 3-dots behavior) */
ytd-compact-video-renderer .wl-custom-add-btn,
ytd-video-renderer .wl-custom-add-btn,
yt-lockup-view-model.ytLockupViewModelWrapper:not(ytd-rich-item-renderer yt-lockup-view-model) .wl-custom-add-btn {
opacity: 0;
pointer-events: none;
}
ytd-compact-video-renderer:hover .wl-custom-add-btn,
ytd-video-renderer:hover .wl-custom-add-btn,
yt-lockup-view-model.ytLockupViewModelWrapper:not(ytd-rich-item-renderer yt-lockup-view-model):hover .wl-custom-add-btn {
opacity: 0.7;
pointer-events: auto;
}
/* On the watch page, 3-dots is always visible — match that behavior */
ytd-watch-flexy ytd-compact-video-renderer .wl-custom-add-btn,
ytd-watch-flexy yt-lockup-view-model .wl-custom-add-btn {
opacity: 0.7 !important;
pointer-events: auto !important;
}
/* --- Added/Checked & Hover Removal States --- */
.wl-custom-add-btn svg.wl-icon-check,
.wl-custom-add-btn svg.wl-icon-remove {
display: none;
}
.wl-custom-add-btn.wl-state-added svg.wl-icon-add {
display: none;
}
.wl-custom-add-btn.wl-state-added svg.wl-icon-check {
display: block;
fill: #2ecc71 !important; /* Green */
}
/* When hovered, show red X icon instead of green checkmark */
.wl-custom-add-btn.wl-state-added:hover svg.wl-icon-check {
display: none !important;
}
.wl-custom-add-btn.wl-state-added:hover svg.wl-icon-remove {
display: block !important;
fill: #e74c3c !important; /* Red */
}
/* Temporary disabled state after removal until mouse leaves the card */
.wl-custom-add-btn.wl-just-removed {
pointer-events: none !important;
opacity: 0.3 !important;
}
/* Hide native elements during programmatic actions to avoid flashing */
ytd-add-to-playlist-renderer.wl-hide-dialog,
tp-yt-paper-dialog.wl-hide-dialog,
ytd-popup-container.wl-hide-popup {
opacity: 0 !important;
pointer-events: none !important;
}
/* --- Media Controls Player Button --- */
.ytp-button.wl-player-btn {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
width: 46px !important;
height: 100% !important;
padding: 0 !important;
margin: 0 !important;
border: none !important;
border-radius: 0 !important;
background: transparent !important;
cursor: pointer !important;
opacity: 0.9 !important;
transition: opacity 0.1s ease, transform 0.1s ease !important;
vertical-align: top !important;
box-sizing: border-box !important;
pointer-events: auto !important;
}
.ytp-button.wl-player-btn:hover {
opacity: 1 !important;
background-color: transparent !important;
}
.ytp-button.wl-player-btn:active {
transform: scale(0.9) !important;
}
.ytp-button.wl-player-btn svg {
width: 25px !important;
height: 25px !important;
fill: #fff !important;
pointer-events: none !important;
}
/* Thicker strokes to match native YouTube media controls icon line-weights */
.ytp-button.wl-player-btn svg.wl-icon-add path {
stroke: #fff !important;
stroke-width: 0.8px !important;
stroke-linejoin: round !important;
stroke-linecap: round !important;
}
/* Added State in player controls */
.ytp-button.wl-player-btn.wl-state-added svg.wl-icon-check {
display: block !important;
fill: #2ecc71 !important;
}
.ytp-button.wl-player-btn.wl-state-added svg.wl-icon-check path {
stroke: #2ecc71 !important;
stroke-width: 1.3px !important;
stroke-linejoin: round !important;
stroke-linecap: round !important;
}
.ytp-button.wl-player-btn.wl-state-added:hover svg.wl-icon-check {
display: none !important;
}
.ytp-button.wl-player-btn.wl-state-added:hover svg.wl-icon-remove {
display: block !important;
fill: #e74c3c !important;
}
.ytp-button.wl-player-btn.wl-state-added:hover svg.wl-icon-remove path {
stroke: #e74c3c !important;
stroke-width: 1.3px !important;
stroke-linejoin: round !important;
stroke-linecap: round !important;
}