/
webru
/
prisma-ui
Обзор
Документация
Войти
/
webru
/
prisma-ui
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ops-layout.css
267 строк
6 KB
webru
Add demo pages, sticky sidebar layout, and form design system.
14 июн 2026, 11:58
14 июн 2026, 11:58
128934f
Код
Авторство
О чём код?
/** * Prisma UI — Layout shell (topbar + sticky rail + scrollable workspace) * Requires ops-tokens.css loaded first. */ /* ── Shell grid ─────────────────────────────────────────────────── */ .ops-shell { display: grid; grid-template-areas: "topbar topbar" "rail workspace"; grid-template-columns: var(--ops-rail-width) 1fr; grid-template-rows: var(--topbar-height) 1fr; height: 100vh; height: 100dvh; overflow: hidden; } /* ── Topbar ─────────────────────────────────────────────────────── */ .topbar { grid-area: topbar; z-index: 100; display: flex; align-items: center; gap: 12px; height: var(--topbar-height); padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--surface-topbar); backdrop-filter: blur(8px); } .topbar__brand { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--text); text-decoration: none; white-space: nowrap; } .topbar__brand:hover { color: var(--accent); text-decoration: none; } .topbar__sep { width: 1px; height: 16px; background: var(--border); flex-shrink: 0; } .topbar__context { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; } .topbar__spacer { flex: 1; } .topbar__meta { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; color: var(--muted); } .topbar__user { font-size: 0.72rem; } .topbar__role { font-size: 0.64rem; padding: 2px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-transform: uppercase; letter-spacing: 0.05em; } .topbar__theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-control); color: var(--muted); cursor: pointer; font-size: 0.75rem; transition: border-color 0.12s ease, color 0.12s ease; } .topbar__theme-btn:hover { color: var(--text); border-color: var(--accent); } .topbar__logout { font-size: 0.72rem; color: var(--muted); text-decoration: none; } .topbar__logout:hover { color: var(--text); text-decoration: none; } /* ── Left rail (fixed while workspace scrolls) ──────────────────── */ .ops-rail { grid-area: rail; display: flex; flex-direction: column; gap: 4px; height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); padding: 10px 8px; border-right: 1px solid var(--border); background: var(--panel); overflow-y: auto; overflow-x: hidden; flex-shrink: 0; } .ops-rail__section { margin-bottom: 8px; } .ops-rail__label { padding: 4px 8px 6px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); opacity: 0.75; } .ops-rail__links { display: flex; flex-direction: column; gap: 2px; } /* ── Workspace (independent scroll) ─────────────────────────────── */ .ops-workspace { grid-area: workspace; height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); overflow-y: auto; overflow-x: hidden; padding: 12px 14px 24px; } /* ── Viewer shell (entity sidebar instead of ops-rail) ──────────── */ .ops-shell--viewer { grid-template-columns: 220px 1fr; } .ops-viewer-rail { grid-area: rail; display: flex; flex-direction: column; height: calc(100vh - var(--topbar-height)); height: calc(100dvh - var(--topbar-height)); border-right: 1px solid var(--border); background: var(--panel); overflow: hidden; } .ops-viewer-rail__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); } .ops-viewer-rail__list { flex: 1; overflow-y: auto; padding: 6px; } .ops-viewer-rail__item { display: block; padding: 7px 8px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 0.78rem; color: var(--muted); text-decoration: none; transition: border-color 0.12s ease, color 0.12s ease; } .ops-viewer-rail__item:hover { color: var(--text); border-color: var(--border); text-decoration: none; } .ops-viewer-rail__item.is-active { color: var(--text); border-color: rgba(59, 130, 246, 0.5); background: rgba(59, 130, 246, 0.08); } .ops-viewer-rail__item-id { display: block; font-family: var(--mono); font-size: 0.68rem; color: var(--mono-data); font-variant-numeric: tabular-nums; } .ops-viewer-rail__foot { padding: 8px; border-top: 1px solid var(--border); } /* ── Mobile ─────────────────────────────────────────────────────── */ @media (max-width: 768px) { .ops-shell { grid-template-areas: "topbar" "workspace"; grid-template-columns: 1fr; grid-template-rows: var(--topbar-height) 1fr; } .ops-rail, .ops-viewer-rail { display: none; } .ops-shell--rail-open .ops-rail { display: flex; position: fixed; top: var(--topbar-height); left: 0; z-index: 90; width: var(--ops-rail-width); box-shadow: var(--shadow-sidebar); } }