{"title":"Layout styling reference","slug":"pos-layout-styling-reference","url":"https://support.storeconnect.com/articles/pos-layout-styling-reference","url_markdown":"https://support.storeconnect.com/articles/pos-layout-styling-reference.md","subtitle":null,"summary":"The part, attribute, and component properties for restyling how the POS arranges cards and tiles with CSS, such as the products grid and the lists of records, including the space between cells and their sizes, with tested examples such as narrowing the lists, and the list of what can\u0026#39;t be styled yet.","type":"Developer_Documentation","video_url":"","keywords":"pos layout css, layout-root, data-variant, grid, list, rail, quick-grid, flex-grid, --sc-layout-gap, --sc-layout-padding, --sc-layout-item-width, --sc-layout-item-min-width, --sc-layout-columns, --sc-layout-list-max-width, products grid css, pos styling api, pos parts","last_modified":"2026-11-12T23:21:16+0000","body_markdown":"A layout is how a screen arranges a set of cards or tiles: a grid, a vertical list, one or two\nscrolling rows, a fixed grid of rows and columns, or columns of uneven cards. A layout holds\nwhatever the screen puts in it. Follow the [POS styling API](pos-styling-api#rules) rules when\nstyling it.\n\n## Where it appears\n\nThe products, customers, orders, and other records a layout shows as cards, the tiles of an\naction grid, the results of a quick search, and the stations and tickets of fulfillment. The\nchoice of grid, list, or rows comes from the layout's settings, and `data-variant` says which\nit is.\n\n## Parts\n\n| Part | What it is | Available from |\n| --- | --- | --- |\n| `layout-root` | The whole layout: the cells it arranges, the space between them, and the fill and corners of a list. | v22.0.8 |\n\nThe **Available from** column shows the first release that carries the name.\n\n## Attributes\n\nNarrow `layout-root` by this, inside `:where()`, to style one kind of layout.\n\n| Attribute | Values | Default | Available from |\n| --- | --- | --- | --- |\n| `data-variant` | `list`, `rail`, `double-rail`, `grid`, `quick-grid`, `flex-grid` | `grid` | v22.0.8 |\n\n- `list` — a vertical list, centered once it reaches the widest it grows\n- `rail` and `double-rail` — one or two rows that scroll sideways\n- `grid` — as many columns as fit, scrolling down\n- `quick-grid` — a fixed number of rows and columns that never scrolls\n- `flex-grid` — columns of cards of uneven heights\n\n## Component properties\n\nSet these on `layout-root` to change every layout, or narrow by `data-variant` to change one\nkind. Where a layout's settings choose a cell size or a count of rows or columns, the settings\nwin, so a store's value changes the layouts whose settings leave it unset. A layout drawn small\ninside a card, such as the ticket preview on a station card, keeps the sizes, gap, and number of\ncolumns it is drawn at, whatever a store sets.\n\n| Property | What it sets | Default | Available from |\n| --- | --- | --- | --- |\n| `--sc-layout-gap` | The space between the cells. | 4px | v22.0.8 |\n| `--sc-layout-padding` | The space inside the edges. A list falls back to 8px. | 0 | v22.0.8 |\n| `--sc-layout-radius` | The corners. A list keeps its own, so round one with `border-radius` on the part. | 0 | v22.0.8 |\n| `--sc-layout-bg-color` | The fill. A list keeps its own, so fill one with `background-color` on the part. | transparent | v22.0.8 |\n| `--sc-layout-item-width` | The width of each cell in a rail or a double rail. | 340px | v22.0.8 |\n| `--sc-layout-item-min-height` | The least height of each cell in a rail. | 40% | v22.0.8 |\n| `--sc-layout-item-min-width` | The narrowest a cell in a grid gets. The grid fits as many columns of it as it can. | 220px | v22.0.8 |\n| `--sc-layout-column-width` | The width a flex grid's columns aim for. | 260px | v22.0.8 |\n| `--sc-layout-rows` | The number of rows in a quick grid. | 1 | v22.0.8 |\n| `--sc-layout-columns` | The number of columns in a quick grid, and the most a flex grid shows. Unset, a flex grid shows as many as fit. | 1 | v22.0.8 |\n| `--sc-layout-list-max-width` | The widest a list layout grows. It stays centered beyond it. | 1000px | v22.0.8 |\n\n## Examples\n\nEach example is tested against the POS on every change.\n\n**\"Make the lists narrower.\"**\n\n```css\n\n[part~='layout-root']:where([data-variant='list']) {\n  --sc-layout-list-max-width: 800px;\n}\n```\n\n**\"Give the lists a white fill and squarer corners.\"**\n\n```css\n\n[part~='layout-root']:where([data-variant='list']) {\n  background-color: #ffffff;\n  border-radius: 8px;\n}\n```\n\n**\"Space the cards in a grid further apart.\"**\n\n```css\n\n[part~='layout-root']:where([data-variant='grid']) {\n  --sc-layout-gap: 12px;\n}\n```\n\n**\"Make the cards in a rail narrower.\"**\n\n```css\n\n[part~='layout-root']:where([data-variant='rail']) {\n  --sc-layout-item-width: 280px;\n}\n```\n\n**\"Tint the space around the cards in a grid.\"**\n\n```css\n\n[part~='layout-root']:where([data-variant='grid']) {\n  background-color: #f5f7fa;\n}\n```\n\n## What can't be styled yet\n\n- The cell sizes and counts of rows and columns that a layout's settings choose, which win over a store's\n- The sizes and gap of a layout drawn small inside a card, which the card chooses\n\n## Retired\n\nNone yet."}