rnxcmkidd: Add the viewport-fit bento shell and a dev feed preview with fixtures
This commit is contained in:
@@ -0,0 +1,189 @@
|
||||
/* Signed-in shell (spec "Desktop and tablet layout", ADR 0001 sections 3 and 6).
|
||||
.app is the size container; .bento is its child, so container queries can
|
||||
style it. The page never scrolls: only the panels' own lists do. */
|
||||
|
||||
.app {
|
||||
container: app / inline-size;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
background: var(--bg);
|
||||
color: var(--ink);
|
||||
transition: background-color .45s, color .45s;
|
||||
}
|
||||
|
||||
/* Below 1001px the tablet and phone tasks own the layout. Until then the
|
||||
panels stack in one column that scrolls inside the app frame. */
|
||||
.bento {
|
||||
height: 100%;
|
||||
padding: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.bento-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* 1001px to 1180px: three columns, narrower sides. */
|
||||
@container app (min-width: 1001px) {
|
||||
.bento {
|
||||
display: grid;
|
||||
grid-template-columns: 244px minmax(0, 1fr) 292px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.bento-col { height: 100%; }
|
||||
}
|
||||
|
||||
/* 1181px and wider. */
|
||||
@container app (min-width: 1181px) {
|
||||
.bento { grid-template-columns: 272px minmax(0, 1fr) 324px; }
|
||||
}
|
||||
|
||||
/* Panels ----------------------------------------------------------------- */
|
||||
|
||||
.tile {
|
||||
position: relative;
|
||||
min-height: 0;
|
||||
background: var(--tile);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--r-panel);
|
||||
box-shadow: var(--shadow-tile);
|
||||
transition: background-color .45s, border-color .45s;
|
||||
}
|
||||
|
||||
.panel { display: flex; flex-direction: column; }
|
||||
|
||||
.panel-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 18px 18px 12px;
|
||||
}
|
||||
.panel-head h2 { margin: 0; font-size: 21px; }
|
||||
|
||||
/* A list that scrolls inside its panel. */
|
||||
.panel-scroll {
|
||||
flex: 1 1 0;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--line-2) transparent;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
/* Faded top and bottom edges on a scrolling list. The mask color is only an
|
||||
alpha source, it is never painted. */
|
||||
.fade-edges {
|
||||
-webkit-mask-image: linear-gradient(to bottom, transparent 0, black 16px, black calc(100% - 32px), transparent 100%);
|
||||
mask-image: linear-gradient(to bottom, transparent 0, black 16px, black calc(100% - 32px), transparent 100%);
|
||||
}
|
||||
|
||||
/* Which panels grow to fill their column. */
|
||||
.bento-left .expert-search { flex: 1 1 0; }
|
||||
.bento-center .feed { flex: 1 1 0; }
|
||||
.bento-right { justify-content: flex-start; }
|
||||
.bento-right .rail-featured { flex: 0 1 auto; max-height: 40%; }
|
||||
.bento-right .rail-trending { flex: 1 1 0; }
|
||||
|
||||
/* Panel contents keep their inner padding off the scroll edge. */
|
||||
.expert-search .search-form { margin: 0 14px; display: flex; flex-direction: column; }
|
||||
.expert-search .search-form input { width: 100%; }
|
||||
.expert-search .chips { padding: 0 14px; }
|
||||
.expert-search .search-results { padding: 12px 14px 24px; }
|
||||
.rail .rail-list { padding: 4px 14px 24px; }
|
||||
.feed .composer { margin: 0 14px 4px; }
|
||||
.feed .feed-list { display: flex; flex-direction: column; gap: 16px; padding: 16px 14px 32px; }
|
||||
|
||||
/* Single-column fallback (below 1001px): lists get a usable height. */
|
||||
@container app (max-width: 1000px) {
|
||||
.bento-col .panel { flex: 0 0 auto; }
|
||||
.bento-col .panel-scroll { flex: 0 0 auto; max-height: 70vh; }
|
||||
.bento-right .rail-featured { max-height: none; }
|
||||
}
|
||||
|
||||
/* Account panel ---------------------------------------------------------- */
|
||||
|
||||
.account { flex: none; }
|
||||
|
||||
.account-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 14px 12px 12px 16px;
|
||||
}
|
||||
.account-word { flex: 1; font-size: 15px; }
|
||||
|
||||
.account-theme {
|
||||
appearance: none;
|
||||
flex: none;
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: var(--r-ctl);
|
||||
background: transparent;
|
||||
color: var(--ink-2);
|
||||
cursor: pointer;
|
||||
transition: background-color .2s, color .2s, transform .15s;
|
||||
}
|
||||
.account-theme:hover { background: var(--tile-2); color: var(--ink); }
|
||||
.account-theme:active { transform: scale(.9); }
|
||||
.account-theme svg { width: 20px; height: 20px; }
|
||||
|
||||
.account-me {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin: 0 12px;
|
||||
padding: 12px;
|
||||
border-radius: 14px;
|
||||
background: var(--tile-2);
|
||||
}
|
||||
.account-me-text { display: flex; flex-direction: column; min-width: 0; }
|
||||
.account-me-text strong { font-size: 14px; }
|
||||
.account-me-text span {
|
||||
font-size: 12.5px;
|
||||
color: var(--ink-3);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.account-live {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 18px 16px;
|
||||
font-size: 12.5px;
|
||||
color: var(--ink-3);
|
||||
}
|
||||
.account-dot {
|
||||
flex: none;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
animation: account-ping 2.2s infinite;
|
||||
}
|
||||
@keyframes account-ping {
|
||||
0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent), transparent 45%); }
|
||||
70% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent), transparent 100%); }
|
||||
100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent), transparent 100%); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.account-dot { animation: none !important; }
|
||||
.panel-scroll { scroll-behavior: auto !important; }
|
||||
}
|
||||
Reference in New Issue
Block a user