ident
All repositories: gitoria
6.1 KB
// styles.hl — the app's CSS, served as /__hl/app.css. It INHERITS THE WORLDAPI THEME (theme/theme.hl, copied verbatim from// layouts.worldapi.org dbe3de7 — never edited here; docs: layouts docs/using-the-theme.md) and keeps only what is page-wide:// the app accent, the page column every page sits in, and the patterns several components share (form lines and buttons, the// account bar, the lists of rows, the form cards). Every component's own look is in its own Style block (ident#33).//// TOKENS: colours only through the named tokens (shared/tokens.hl = layouts' file, byte-equal); the app sets only its accent// (orange). Corners: radiusSmall (5px) / radiusLarge (10px: panels, rows). Borderless — `node theme/check-theme.mjs .` must// report 0 problems (a deploy gate).// In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a selector written verbatim; a selector the theme// already writes may not be written again (hl:web refuses it) — so the theme's own elements are NOT repeated here.// PHONE FIRST: every rule outside a block is the phone's (390 px); the `@media` blocks only ADD the wide layout (from 60rem,// the theme's breakpoint).inherit '../theme/theme.hl'import { var } from 'hl:web/css'import { orange, colorBackgroundSunken, colorTextStrong, colorTextMuted, colorDanger, colorSuccess, colorSurface } from '../shared/tokens.hl'colorAccent = var(orange) // the app's accent: the only token this app sets// ---- looks several components share: a component names one in its own Style (`pLead = leadLook`) and writes `Style.pLead` ----// (hybriel#253: Style.x does not find a rule of this file, so the body is a static the component imports.)static leadLook = {color = colorTextMuted}static messageLook = {margin = '0'minHeight = '1.5em'color = colorDanger}static noticeLook = {margin = '0'color = colorSuccessempty {display = 'none'}}// the wide pages (inbox, per-app settings, identity page) name it: `pWide = wideLook`, `identCard { Style.pWide`static wideLook = {maxWidth = '46rem'}// the round picture of an identity (identity row, choice list, identity page): the size stays with each liststatic avatarLook = {flex = '0 0 auto'objectFit = 'cover'borderRadius = '50%'background = colorBackgroundSunken}// the small tap-sized link look: the "Notif." chip (identity page) and the "Used in…" link (identities list)static chipLook = {display = 'inline-flex'alignItems = 'center'justifyContent = 'center'minHeight = 'var(--layout-tap)'minWidth = 'var(--layout-tap)'padding = '0 .8rem'fontSize = '.875rem'background = colorBackgroundSunkenborderRadius = 'var(--radius-small)'}// ---- the page column (every page, signed in or out): centred, no panel ----------------------------------------------------identCard {display = 'grid'gap = '1rem'maxWidth = '34rem'margin = '0 auto'}'ident-card h1,ident-card h2,ident-card p' {margin = '0'}'ident-card form' {display = 'grid'gap = '.8rem'}'ident-card label' {display = 'grid'gap = '.25rem'marginBottom = '0'}'ident-card section' {display = 'grid'gap = '.8rem'}@media {minWidth = '60rem'identCard {gap = '1.2rem'}}// ---- shared by several components: form lines, the status lines, section heads -----------------------------------------------formButtons {display = 'flex'flexWrap = 'wrap'gap = '.5rem'}fieldHint {color = colorTextMutedfontSize = '.875rem'fontWeight = '400'}sectionHead {display = 'flex'flexWrap = 'wrap'alignItems = 'center'justifyContent = 'space-between'gap = '.5rem'}code {fontFamily = 'ui-monospace, monospace'fontSize = '.875rem'color = colorTextStrongoverflowWrap = 'anywhere'wordBreak = 'break-all'}// ---- signed in: the account bar of apps, inbox and per-app settings -------------------------------------------------------------// The user menu (header, a popover over the top right) carries the email, Sign out and Sign out everywhere on every page. On a PHONE the// account bar keeps only the page's own link, at the LEFT — the open menu then covers nothing of the page (tests/mobile.mjs); from 60rem// the address shows and the link goes to the right (ident#35: the phone is the base, the wide layout is added)accountBar {display = 'flex'flexWrap = 'wrap'alignItems = 'center'justifyContent = 'flex-start'gap = '.25rem .5rem'}'account-bar a' {display = 'inline-flex'alignItems = 'center'minHeight = 'var(--layout-tap)'minWidth = 'var(--layout-tap)'justifyContent = 'center'}userEmail {display = 'none'color = colorTextMutedfontSize = '.875rem'overflowWrap = 'anywhere'}@media {minWidth = '60rem'accountBar {justifyContent = 'space-between'}userEmail {display = 'block'}}// ---- the lists of rows (identities, used in, choice, apps, inbox, connections, kinds): one pattern; each component adds its own parts'#identities,#usedin,#chooselist,#apps,#inbox,#conns,#kinds' {listStyle = 'none'margin = '0'padding = '0'display = 'grid'gap = '.5rem'}'#identities li,#usedin li,#chooselist li,#apps li,#inbox li,#conns li,#kinds li' {display = 'flex'flexWrap = 'wrap'alignItems = 'center'justifyContent = 'space-between'gap = '.5rem'margin = '0'padding = '.7rem .8rem'background = colorSurfaceborderRadius = radiusLarge}// ---- the form cards (the identity form and the app form) --------------------------------------------------------------------------'#identityform,#appform' {display = 'grid'gap = '.8rem'padding = '1rem'background = colorSurfaceborderRadius = radiusLarge}'#identityform input,#appform input' {background = colorBackgroundSunken}// every grid item may shrink (a wide field pushed the form past the screen)'#identityform > *,#appform > *' {minWidth = '0'}// the brand link of the theme's header is 43 px wide at 390 (the tap minimum is 44 × 44): a minimum width, here, because the theme// is never edited in an app'html application-header > a.brand' {minWidth = 'var(--layout-tap)' // (html + > : outranks the theme's own `application-header > a.brand { min-width: 0 }`; real Chrome measured it 43 px)}
Branches
Latest commits
- 0f6d1592Merge branch 'f18b-shell-session' into mainIdent
- 19868218|||PR ident#39 shell reads its session member instead of a cross-file emitmre
- 5d1b3fedMerge branch 'v61-day61' into mainIdent
- 83faeb15|||PR ident: vendor Hybriel day61mre
- b2572b34Merge branch 'v59-day59' into mainIdent
- 67cf016d|||PR ident: vendor Hybriel day59mre
- 600c043dMerge branch 'v58-day58' into mainIdent
- 365f8c80|||PR ident: vendor Hybriel day58mre
- 585126e5Merge branch 'f16-setf' into mainIdent
- 953bf03a|||PR ident setF mirror dropped (hybriel#370)mre
- a1419d9cMerge branch 'f15-navigate' into mainIdent
- 3b3e451f|||PR ident#36 navigate to the app instead of location.assignmre
- e36f4516Merge branch 'f14-online' into mainIdent
- 2c5eac91|||PR ident#38 online state without probe timermre
- bf1980f2Merge branch 'v56-day56' into mainIdent
- 62ae0adf|||PR ident: vendor Hybriel day56mre
- 0d18abc4Merge branch 'f13-avatar' into mainIdent
- 2a99730a|||PR ident#37 avatar in hlmre
- fa4ed25bMerge branch 'f11-upsert' into mainIdent
- 8f3d9bc9|||PR ident#42 keyed upsert and removemre