Skip to content

Commit be849d9

Browse files
committed
Design feedback
1 parent d332096 commit be849d9

File tree

2 files changed

+46
-43
lines changed

2 files changed

+46
-43
lines changed

injected/src/features/duckplayer/assets/mobile-video-drawer.css

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@
111111
color: var(--drawer-color);
112112
left: 0;
113113
padding: var(--drawer-padding) var(--drawer-padding) calc(var(--drawer-padding) + var(--drawer-buffer));
114+
padding-left: calc(var(--drawer-padding) + env(safe-area-inset-left));
115+
padding-right: calc(var(--drawer-padding) + env(safe-area-inset-right));
114116
position: fixed;
115117
width: 100%;
116118
}
@@ -175,22 +177,30 @@
175177
align-items: center;
176178
display: flex;
177179
gap: 12px;
178-
margin-right: 32px; /* Safe buffer for absolute-positioned info button */
179180
}
180181

181182
.logo {
182183
flex: 0 0 32px;
183-
width: 32px;
184184
height: 32px;
185+
width: 32px;
185186
}
186187

187188
.title {
189+
flex: 1 1 auto;
188190
font-size: 19px;
189191
font-weight: 700;
190192
line-height: calc(24 / 19);
191193
}
192194

193-
/* */
195+
.info {
196+
align-self: start;
197+
flex: 0 0 16px;
198+
height: 32px;
199+
position: relative;
200+
width: 16px;
201+
}
202+
203+
/* BUTTONS */
194204

195205
.buttons {
196206
gap: 8px;
@@ -199,23 +209,6 @@
199209
margin-bottom: 4px;/* TODO: replace with parent gap */
200210
}
201211

202-
.remember {
203-
height: 40px;
204-
border-radius: 8px;
205-
display: flex;
206-
gap: 16px;
207-
align-items: center;
208-
justify-content: space-between;
209-
padding-left: 8px;
210-
padding-right: 8px;
211-
grid-column: 1/4;
212-
grid-row: 5/6;
213-
214-
@media screen and (min-width: 568px) {
215-
grid-column: 2/3;
216-
}
217-
}
218-
219212
.button {
220213
flex: 1 1 50%;
221214
margin: 0;
@@ -229,35 +222,34 @@
229222
background: var(--button-background);
230223
color: var(--button-color);
231224
text-decoration: none;
232-
line-height: 16px;
233-
padding: 0 12px;
225+
line-height: 44px;
226+
padding: 0 16px;
234227
font-size: 15px;
235228
font-weight: 600;
236229
border-radius: 8px;
237230
white-space: nowrap; /* TODO: Test on other languages */
238231
}
239232

240-
.button--info {
241-
align-self: start;
233+
.info-button {
242234
appearance: none;
243235
background: none;
244236
border: 0;
245237
height: 40px;
246238
margin: 0;
247239
padding: 12px;
248240
position: absolute;
249-
right: 0px;
250-
top: 0px;
241+
right: -16px;
242+
top: -16px;
251243
width: 40px;
252244
}
253245

254-
.button--info svg {
246+
.info-button svg {
255247
display: block;
256248
width: 16px;
257249
height: 16px;
258250
}
259251

260-
.button--info svg path {
252+
.info-button svg path {
261253
fill: var(--info-color);
262254
}
263255

@@ -279,9 +271,15 @@
279271
}
280272
}
281273

282-
.open:hover {
283-
}
284-
.cancel:hover {
274+
/* REMEMBER ME */
275+
276+
.remember {
277+
height: 40px;
278+
display: flex;
279+
gap: 16px;
280+
align-items: center;
281+
justify-content: space-between;
282+
padding: 8px;
285283
}
286284

287285
.remember-label {
@@ -301,6 +299,8 @@
301299
display: flex;
302300
}
303301

302+
/* SWITCH */
303+
304304
.switch {
305305
margin: 0;
306306
padding: 0;
@@ -319,8 +319,8 @@
319319
}
320320

321321
.thumb {
322-
width: 20px;
323-
height: 20px;
322+
width: 24px;
323+
height: 24px;
324324
border-radius: 100%;
325325
background: var(--switch-thumb-background);
326326
position: absolute;
@@ -330,27 +330,30 @@
330330
transition: .2s left ease-in-out;
331331
}
332332

333+
.switch[aria-checked="true"] .thumb {
334+
left: calc(100% - 32px + 4px);
335+
}
333336
.switch[aria-checked="true"] {
334337
background: var(--switch-on-background);
335338
}
336339

337340
.ios-switch {
338-
width: 42px;
339-
height: 24px;
341+
width: 51px;
342+
height: 31px;
340343
}
341344

342345
.ios-switch .thumb {
343346
top: 2px;
344347
left: 2px;
345-
width: 20px;
346-
height: 20px;
347-
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.25)
348+
width: 27px;
349+
height: 27px;
350+
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.25);
348351
}
349352

350353
.ios-switch:active .thumb {
351354
scale: 1;
352355
}
353356

354357
.ios-switch[aria-checked="true"] .thumb {
355-
left: calc(100% - 22px)
356-
}
358+
left: calc(100% - 32px + 3px);
359+
}

injected/src/features/duckplayer/components/ddg-video-drawer-mobile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ export class DDGVideoDrawerMobile extends HTMLElement {
7373
<div class="heading">
7474
<div class="logo">${svgIcon}</div>
7575
<div class="title">${this.text.title}</div>
76-
</div>
77-
<div class="info">
78-
<button class="button--info" type="button" aria-label="Open Information Modal">${infoIcon}</button>
76+
<div class="info">
77+
<button class="info-button" type="button" aria-label="Open Information Modal">${infoIcon}</button>
78+
</div>
7979
</div>
8080
<div class="buttons">
8181
<button class="button cancel ddg-vpo-cancel" type="button">${this.text.buttonOptOut}</button>

0 commit comments

Comments
 (0)