There was no width media query anywhere. At 360px the header wrapped into three rows covering a third of the screen, an agent card's trailing controls pushed the page 100px wider than the screen, and the terminal's state badges wrapped onto its first rows of text. At 40em or less the brand and the menus share the first header row, the nav is one row that scrolls sideways (its indicator accounts for the scroll), a card's header line wraps and its icon is smaller, and the state badges over a terminal are one row that scrolls sideways.
81 lines
2.1 KiB
CSS
81 lines
2.1 KiB
CSS
/* <AgentCard> content layout — the clickable/selectable container
|
|
itself is `Card`'s (`ui/card/`); this is just the name/badges/
|
|
message arrangement inside one. */
|
|
.ui-agent-card-line1 {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 0.4em 0.6em;
|
|
}
|
|
.ui-agent-card-name {
|
|
font-weight: 600;
|
|
}
|
|
/* Pushes the wanted-state control to the row's trailing edge regardless
|
|
of how wide the status badge next to it ends up. */
|
|
.ui-agent-card-wanted {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4em;
|
|
margin-left: auto;
|
|
}
|
|
/* The "login needed" badge and its "log in" button, kept together; the
|
|
wrapper also keeps their clicks, and the dialog's, off the card. */
|
|
.ui-agent-card-login {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4em;
|
|
}
|
|
.ui-agent-card-message {
|
|
color: var(--muted);
|
|
white-space: normal;
|
|
word-break: break-word;
|
|
}
|
|
/* Icon (`AgentIcon`) beside the name/message. */
|
|
.ui-agent-card-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 0.7em;
|
|
}
|
|
.ui-agent-card-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.35em;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* The header is what opens the card: it reads as a control without a box. */
|
|
.ui-agent-card-row[role="button"] {
|
|
cursor: pointer;
|
|
}
|
|
/* The opened body, set off from the header by a rule. */
|
|
.ui-agent-card-detail {
|
|
margin-block-start: 0.75em;
|
|
padding-block-start: 0.75em;
|
|
border-block-start: 1px solid var(--border);
|
|
}
|
|
|
|
/* The same chevron as a folded card's (`ui/disclosure/`): right while shut,
|
|
down while open, so the header reads as something that unfolds. */
|
|
.ui-agent-card-chevron {
|
|
align-self: center;
|
|
width: 0.55em;
|
|
height: 0.55em;
|
|
flex: none;
|
|
border-right: 2px solid var(--muted);
|
|
border-bottom: 2px solid var(--muted);
|
|
transform: rotate(-45deg);
|
|
transition: transform 0.15s ease;
|
|
}
|
|
/* The placeholder card keeps the chevron's box without its arrow. */
|
|
.ui-agent-card-chevron-blank {
|
|
border-color: transparent;
|
|
}
|
|
.ui-agent-card-row[aria-expanded="true"] .ui-agent-card-chevron {
|
|
transform: rotate(45deg);
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.ui-agent-card-chevron {
|
|
transition: none;
|
|
}
|
|
}
|