ident
All repositories: gitoria
5.2 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// ---- 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 .lead' {color = colorTextMuted}'ident-card section' {display = 'grid'gap = '.8rem'}// the wide pages (inbox, per-app settings, identity page)'ident-card.wide' {maxWidth = '46rem'}@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'}'.message' {margin = '0'minHeight = '1.5em'color = colorDanger}'.notice' {margin = '0'color = colorSuccess}'.notice:empty' {display = 'none'}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
- 9f2ad803ident#34: notification switches: push/email by name=..., locked by aria-disabled, the switch look is the role=switch button (no switch/push/email/locked classes)mre
- e0f0ddaaident#34: inbox: the Mark read/unread button is styled as the button of its note-foot, the icon is found as the row's img (no toggle/icon classes)mre
- 16b49756ident#34: unused row classes (choice, usedrow, kind, shortid) droppedmre
- f9d6fb38ident#34: apps and identity rows: the Edit/New secret/Delete buttons carry name=..., the API key is found by its element; unused row classes (app, identity, shortid) droppedmre
- b323265aMerge branch 'f5-styles' into mainIdent
- 9ced53c3|||PR ident#33 ident#35 every component's styles live in its own Style block; styles.hl keeps the page-wide rest; the account bar is phone first (min-width: 60rem block); the avatar preview is hidden with the hidden attribute (ident#34 in part)mre
- f28333e4ident#33 ident#35: styles.hl keeps only the accent, the page column and the shared patterns; the account bar is written phone first (base rule + one min-width: 60rem block) instead of a max-width overridemre
- 5b4541fcident#33: the selector sign-in frame's rules move into embed.hl's Stylemre
- 00235f21ident#33: the per-app notification switches move into appsettings.hl's Stylemre
- 2249945cident#33: the inbox and connection list rules move into inbox.hl's Stylemre
- f2d9f79fident#33: the apps list and the secret box move into apps.hl's Stylemre
- 8370b748ident#33: the app request box moves into home.hl's Stylemre
- 40bf3b97ident#33: the 404 page's home link rule moves into notfound.hlmre
- 40627a89ident#33: the time zone section's spacing moves into timezone.hlmre
- d389db08ident#33: the identity page's rules and the Notif. chip move into identity.hl's Stylemre
- ddda0b5bident#33: the identity row's parts move into identitylist.hl's Stylemre
- 47e516afident#33 ident#34: the identity form's avatar rules move into identityform.hl; the preview and Remove button are hidden with the hidden attribute instead of built class strings (avatarPreviewClass, avatarRemoveClass gone)mre
- 5cb5cf0eident#33: the code field's look moves into codestep.hl's Stylemre
- f421cd60ident#33: the shell's own rules (user menu address, offline note, network probe) move into main.hl's Stylemre
- c512fb96Merge branch 'f4-homesplit' into mainIdent