git clone https://garage44.eu/jeroen/cartopolis.git.. /crates/atlas/web/src/components/elements/account/account.css
/*
* A list of records, one bordered row each: the account list, and what any
* admin page that is a list of things with a "Manage" on the right can share.
*/
.record-list {
display: flex;
flex-direction: column;
gap: var(--m-space-2);
list-style: none;
margin: 0;
padding: 0;
}
.record {
background: var(--m-surface-raised);
border: 1px solid var(--m-border);
border-radius: var(--m-radius);
padding: var(--m-space-3) var(--m-space-4);
&.is-disabled {
/* Dimmed, but never hidden: a disabled account is the one an operator is
most likely to be looking for. */
opacity: 0.62;
}
/* The record whose form the context panel holds, so the list says which
one is being edited without anyone matching names. */
&.is-selected {
border-color: var(--m-accent);
box-shadow: inset 3px 0 0 var(--m-accent);
opacity: 1;
}
}
.record-main {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: var(--m-space-2);
}
.record-name {
color: var(--m-text-strong);
font-weight: 600;
/* Usernames are user input and can be 64 characters of anything. */
overflow-wrap: anywhere;
}
.record-spacer {
flex: 1;
}
.record-meta {
color: var(--m-text-dim);
font-size: var(--m-font-size-sm);
margin-top: var(--m-space-1);
/* Several facts in one row are separated by a gap on the row rather than
punctuation in the markup, so a row with one fact is unchanged. */
& > span + span::before {
color: var(--m-text-faint);
content: "·";
padding: 0 var(--m-space-2);
}
}
.account-tags {
display: inline-flex;
flex-wrap: wrap;
gap: var(--m-space-1);
}
/* ── The form in the context panel ─────────────────────────────────────── */
.account-form {
display: flex;
flex-direction: column;
gap: var(--m-space-3);
}
.account-form-section {
border-top: 1px solid var(--m-border);
display: flex;
flex-direction: column;
gap: var(--m-space-2);
padding-top: var(--m-space-3);
& h3 {
color: var(--m-text-dim);
font-size: var(--m-font-size-sm);
font-weight: 600;
letter-spacing: 0.04em;
margin: 0;
text-transform: uppercase;
}
}
.account-form-actions {
display: flex;
flex-wrap: wrap;
gap: var(--m-space-2);
}
/* Pushes Close to the far end of the panel footer, away from Delete. */
.account-form-spacer {
flex: 1;
}
/* ── The compact list (`docs/mockups/admin-accounts/`) ─────────────────── */
/* One bordered list of lines rather than a card per account: about twelve on
a phone instead of five. */
.account-list {
background: var(--m-surface-raised);
border: 1px solid var(--m-border);
border-radius: var(--m-radius-lg);
gap: 0;
overflow: hidden;
}
.record.account-line {
background: none;
border: 0;
border-radius: 0;
border-top: 1px solid var(--m-border);
padding: 0;
&:first-child {
border-top: 0;
}
&.is-open {
background: var(--m-surface);
}
}
.account-head {
align-items: center;
background: none;
border: 0;
color: inherit;
cursor: pointer;
display: flex;
font: inherit;
gap: var(--m-space-3);
min-height: 48px;
padding: var(--m-space-2) var(--m-space-3);
text-align: left;
width: 100%;
&:hover {
background: var(--m-hover);
}
&:focus-visible {
outline: 2px solid var(--m-focus);
outline-offset: -2px;
}
}
.account-avatar {
align-items: center;
background: var(--m-accent-soft);
border-radius: var(--m-radius-full);
color: var(--m-accent-text);
display: flex;
flex: none;
font-size: var(--m-font-size-sm);
font-weight: 600;
height: 30px;
justify-content: center;
width: 30px;
}
.account-who {
display: flex;
flex: 1;
flex-direction: column;
min-width: 0;
}
.account-name {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: var(--m-space-2);
}
.account-seen {
align-items: center;
color: var(--m-text-dim);
display: flex;
font-size: var(--m-font-size-sm);
gap: var(--m-space-1);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.account-dot {
background: var(--m-text-faint);
border-radius: var(--m-radius-full);
flex: none;
height: 7px;
width: 7px;
&.is-online {
background: var(--m-success);
}
}
.account-chevron {
color: var(--m-text-faint);
flex: none;
.is-open & {
color: var(--m-accent);
}
}
/* ── An opened line ────────────────────────────────────────────────────── */
.account-more {
display: flex;
flex-direction: column;
gap: var(--m-space-2);
/* Lined up under the name, past the avatar. */
padding: 0 var(--m-space-3) var(--m-space-3) calc(30px + 2 * var(--m-space-3));
}
.account-mail {
color: var(--m-text-dim);
font-size: var(--m-font-size-sm);
margin: 0;
overflow-wrap: anywhere;
}
.account-stats {
display: grid;
gap: var(--m-space-2);
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.account-stat {
background: var(--m-surface-sunken);
border: 1px solid var(--m-border);
border-radius: var(--m-radius-sm);
display: flex;
flex-direction: column;
padding: var(--m-space-1) var(--m-space-2);
& b {
color: var(--m-text-strong);
font-size: 1.05rem;
}
& span {
color: var(--m-text-dim);
font-size: var(--m-font-size-sm);
}
}
.account-bars {
align-items: flex-end;
display: flex;
gap: 2px;
height: 28px;
& span {
background: var(--m-accent-soft);
border-radius: 1px;
flex: 1;
}
& span.is-today {
background: var(--m-accent);
}
}
.account-bars-cap {
color: var(--m-text-faint);
font-size: var(--m-font-size-sm);
margin: 0;
}
.account-facts {
column-gap: var(--m-space-3);
display: grid;
font-size: var(--m-font-size-sm);
grid-template-columns: auto 1fr;
margin: 0;
row-gap: var(--m-space-1);
& dt {
color: var(--m-text-faint);
}
& dd {
color: var(--m-text-dim);
margin: 0;
overflow-wrap: anywhere;
}
}
/* Sort and filter above the list. */
.accounts-order {
display: flex;
flex-wrap: wrap;
gap: var(--m-space-2);
}