Skip to content

Commit 6edd0a5

Browse files
author
satoshinotdead
committed
test
1 parent 5acdc50 commit 6edd0a5

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

scss/mobile-stuff.scss

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,125 @@ body.f-nav-hidden:not(
293293
.topic-list-item:last-of-type {
294294
border-bottom: none;
295295
}
296+
297+
// temp override for categories page on mobile
298+
.categories-and-latest {
299+
.category-list {
300+
@include viewport.until(sm) {
301+
border-collapse: separate;
302+
303+
th.topics,
304+
.category-logo {
305+
display: none;
306+
}
307+
308+
thead tr th {
309+
font-size: var(--font-up-1-rem);
310+
font-weight: bold;
311+
}
312+
313+
tbody {
314+
display: flex;
315+
flex-direction: column;
316+
gap: 1em;
317+
padding-top: 1em;
318+
border: 0;
319+
}
320+
321+
tbody tr {
322+
display: grid;
323+
grid-template-areas:
324+
"title topics"
325+
"category category"
326+
"subcategory subcategory";
327+
row-gap: 1em;
328+
border: 1px solid var(--primary-300);
329+
border-radius: var(--d-border-radius-large);
330+
box-shadow: 0 0 12px 1px var(--topic-card-shadow);
331+
}
332+
333+
td.category {
334+
display: contents;
335+
border-top-left-radius: var(--d-border-radius-large);
336+
border-bottom-left-radius: var(--d-border-radius-large);
337+
border-width: 2px;
338+
padding: 1em 1.5rem;
339+
}
340+
341+
tbody h3 {
342+
grid-area: title;
343+
padding: 1em 0 0 1.5rem;
344+
font-size: var(--font-up-1-rem);
345+
346+
.category-name {
347+
display: flex;
348+
align-self: center;
349+
}
350+
351+
.badge-category {
352+
gap: 0.25em;
353+
align-items: center;
354+
font-size: var(--font-up-1-rem);
355+
356+
.d-icon:first-of-type:not(.d-icon-lock),
357+
&.--style-square::before,
358+
&.--style-emoji .emoji {
359+
width: 1.25em;
360+
height: 1.25em;
361+
margin-right: 0.25em;
362+
}
363+
364+
&.--style-square::before {
365+
border-radius: 6px;
366+
}
367+
}
368+
369+
.d-icon.d-icon-lock {
370+
order: 1;
371+
}
372+
}
373+
374+
.topics {
375+
width: auto;
376+
padding: 1em 1.5rem 0 0;
377+
display: flex;
378+
align-items: center;
379+
justify-content: end;
380+
}
381+
382+
.category-description {
383+
grid-area: category;
384+
padding: 0 1.5rem;
385+
margin: 0;
386+
font-size: var(--font-down-1-rem);
387+
}
388+
389+
.subcategories {
390+
grid-area: subcategory;
391+
gap: 0.25em 0.5em;
392+
padding: 0 1.5rem 1em;
393+
margin: 0;
394+
395+
.badge-category__wrapper {
396+
background-color: light-dark(
397+
oklch(from var(--category-badge-color) 98% calc(c * 0.2) h),
398+
oklch(from var(--category-badge-color) 45% calc(c * 0.5) h)
399+
);
400+
padding: 0.25em 0.5rem;
401+
border-radius: var(--d-border-radius);
402+
}
403+
404+
.badge-category__name {
405+
color: light-dark(
406+
oklch(from var(--category-badge-color) 20% calc(c * 1) h),
407+
oklch(from var(--category-badge-color) 100% calc(c * 0.9) h)
408+
);
409+
}
410+
411+
.badge-category.--style-square::before {
412+
border-radius: 3px;
413+
}
414+
}
415+
}
416+
}
417+
}

0 commit comments

Comments
 (0)