SBS-R03/norms/rules/shtukbase-style/SBS-R03.md
A card is at most 3:1
SHOULDblockscheckactive
A card is not longer than 3:1 (width to height, or height to width); a longer element is a row of a list. A card is as tall as its content, with no empty space added. A tile without text (an icon over a name) is almost square, 5:4.
Why: A strip that is five times as wide as it is tall is read as a row, not as a card; mixing the two in one grid makes the grid ragged. Padding a card to make it taller adds empty space nobody asked for.
Page fields (15)
| ruleId | SBS-R03 |
| requirement | A card is not longer than 3:1 (width to height, or height to width); a longer element is a row of a list. A card is as tall as its content, with no empty space added. A tile without text (an icon over a name) is almost square, 5:4. |
| level | SHOULD |
| floor | false |
| status | active |
| sphere | design |
| appliesTo | /design |
| enforcers | .shtukbase/packages/shtukbase-style/checks/card-ratio.ts |
| enforcerKind | gate |
| mode | enforce |
| because | A strip that is five times as wide as it is tall is read as a row, not as a card; mixing the two in one grid makes the grid ragged. Padding a card to make it taller adds empty space nobody asked for. |
| baseline | 0 |
| reviewBy | 2027-05-29 |
| pack | shtukbase-style |
| rail | Make the element a row of a list, or let the card be as tall as its content; remove a fixed width and height that pull it out of 3:1. |
A card is not longer than 3:1 (width to height, or height to width); a longer element is a row of a list. A card is as tall as its content, with no empty space added. A tile without text (an icon over a name) is almost square, 5:4.
What counts as a violation. A CSS rule whose last selector names a card (a class or data-slot that is card or ends with -card; not its parts such as .card-header), or an element with such a class and a style attribute, that sets aspect-ratio longer than 3:1 (or 1:3), or a fixed width and height (px, rem, em) whose ratio is longer than 3:1 in either direction.
What the check cannot see. A size that comes from var(), a percentage, calc() or auto, or from the content. A person sees that in the catalog of components.
Why. A strip that is five times as wide as it is tall is read as a row, not as a card; mixing the two in one grid makes the grid ragged.
Exceptions. A line (or the line above it) marked shtukbase-style: allow.
Run. shtuk run shtukbase-style card-ratio. A violation is a line with the file and the line number, exit code 1.