WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9bc612b

Browse files
committed
Makes scrollable features vertically oriented on narrow sizes
(#4769, #4773, PLG-138)
1 parent d996d8c commit 9bc612b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/webviews/apps/home/components/welcome-parts.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ export class GlScrollableFeatures extends LitElement {
249249
:host::after {
250250
content: ' ';
251251
position: absolute;
252+
display: block;
252253
top: 0;
253254
width: var(--final-side-shadow-padding);
254255
height: 100%;
@@ -272,6 +273,36 @@ export class GlScrollableFeatures extends LitElement {
272273
overflow-y: hidden;
273274
scrollbar-width: none;
274275
}
276+
277+
@media (max-width: 400px) {
278+
:host {
279+
--final-side-shadow-padding: max(var(--side-shadow-padding), 2em);
280+
margin-top: -1em;
281+
}
282+
:host::before,
283+
:host::after {
284+
height: var(--final-side-shadow-padding);
285+
width: 100%;
286+
left: 0;
287+
right: 0;
288+
}
289+
:host::before {
290+
position: sticky;
291+
top: 0;
292+
background: linear-gradient(to top, transparent 0%, var(--side-shadow-color) 83%);
293+
}
294+
:host::after {
295+
position: fixed;
296+
top: auto;
297+
bottom: 0;
298+
background: linear-gradient(to bottom, transparent 0%, var(--side-shadow-color) 83%);
299+
}
300+
.content {
301+
flex-direction: column;
302+
gap: 0.5em;
303+
padding: 0;
304+
}
305+
}
275306
`,
276307
];
277308

0 commit comments

Comments
 (0)