{"title":"Media gallery styling reference","slug":"pos-media-gallery-styling-reference","url":"https://support.storeconnect.com/articles/pos-media-gallery-styling-reference","url_markdown":"https://support.storeconnect.com/articles/pos-media-gallery-styling-reference.md","subtitle":null,"summary":"Every part, attribute, and component property for restyling the POS\u0026#39;s media galleries with CSS, a record\u0026#39;s images shown one at a time in a frame a person swipes, on a product\u0026#39;s page, the bundle\u0026#39;s dialog, and a product card with more than one image, with tested examples such as rounding the frame or ringing the thumbnail of the image showing, and the list of what can\u0026#39;t be styled yet.","type":"Developer_Documentation","video_url":"","keywords":"pos media gallery css, product image gallery css, gallery thumbnails css, media-gallery-root, media-gallery-frame, media-gallery-previous-button, media-gallery-next-button, media-gallery-indicator, media-gallery-dot, media-gallery-thumbnails, media-gallery-thumbnail, data-active, aria-current, --sc-media-gallery-max-width, --sc-media-gallery-max-height, --sc-media-gallery-aspect-ratio, --sc-media-gallery-radius, --sc-media-gallery-shadow, --sc-media-gallery-gap, --sc-media-gallery-nav-indicator-size, --sc-media-gallery-thumbnail-size, --sc-media-gallery-thumbnail-border, pos styling api, pos parts","last_modified":"2026-12-02T03:12:47+0000","body_markdown":"A media gallery shows a record's images one at a time, such as the pictures on a product's page. Operators swipe the frame to move between images, or tap a thumbnail to pick one. You can change the size, shape, corners, and shadow of the media gallery frame, the size and border of the thumbnails, etc. Follow the [POS styling API](pos-styling-api#rules) rules when you style media galleries.\n\n## Where a media gallery appears\n\nMedia galleries appear in these places:\n\n- On a product's page and in the bundle dialog. When the product has more than one image, the media gallery has a row of thumbnails under the frame, and previous and next buttons on the frame. In the bundle dialog, the frame has a shadow.\n- On a product card with more than one image, in place of the card's image. Operators swipe the image, and there are no dots or buttons. The frame is 1.3 / 1 here, inside the card's `card-image` part, so the card image properties set the shape of each image.\n\nNo screen shows the media gallery dots yet. Media galleries on a product's page and in the bundle dialog show thumbnails instead, and media galleries on product cards have no dots.\n\nEach image in a media gallery frame and in the thumbnails is a [media image](pos-media-image-styling-reference). The media gallery sets the size and corners of these images, and the fit of the image in the frame, so media image properties for these set on `:root` do not change them. A fit set on `:root` does change the thumbnails. To change the images in media galleries only, set the properties on `media-gallery-frame` or `media-gallery-thumbnail`.\n\nOn a product's page and in the bundle dialog, the screen sets the corners of the frame and, on a small screen, the maximum height of the frame. `--sc-media-gallery-radius` and `--sc-media-gallery-max-height` set on `:root` do not change these, so set them on `media-gallery-root` instead.\n\nThe swipe track inside a media gallery frame is a [pager](pos-pager-styling-reference), so a rule for `pager-root` styles it along with every other pager.\n\n## Parts\n\n| Part | What it is | Available from |\n| --- | --- | --- |\n| `media-gallery-root` | The whole gallery: the image showing and, under it, the strip of thumbnails when the screen shows one. | v22.0.19 |\n| `media-gallery-frame` | The box the image showing fills, with the corners and shadow, which operators swipe to see the next image. Each image in it is a media image. | v22.0.19 |\n| `media-gallery-previous-button` | The button on the frame that shows the image before, which appears while the pointer is over a gallery of more than one image. It is a [button](pos-button-styling-reference), so the button properties apply to it. | v22.0.19 |\n| `media-gallery-next-button` | The button on the frame that shows the image after, which appears while the pointer is over a gallery of more than one image. It is a [button](pos-button-styling-reference), so the button properties apply to it. | v22.0.19 |\n| `media-gallery-indicator` | The row of dots at the foot of the frame, one for each image, on a gallery of more than one image without thumbnails. Not used on any screen yet. | v22.0.19 |\n| `media-gallery-dot` | One dot, standing for one image. Not used on any screen yet. | v22.0.19 |\n| `media-gallery-thumbnails` | The strip of thumbnails under the frame, on a gallery of more than one image whose screen shows them. | v22.0.19 |\n| `media-gallery-thumbnail` | One thumbnail, which shows the thumbnail's image in the frame when pressed. The image in it is a media image. | v22.0.19 |\n\nThe **Available from** column shows the first release that carries the name.\n\n## Attributes\n\nNarrow `media-gallery-dot` or `media-gallery-thumbnail` by these, inside `:where()`, to style the\none for the image showing.\n\n| Attribute | Values | Default | Available from |\n| --- | --- | --- | --- |\n| `media-gallery-dot[data-active]` | `true`, `false` | `false` | v22.0.19 |\n| `media-gallery-thumbnail[aria-current]` | `true`, `false` | `false` | v22.0.19 |\n\n## Component properties\n\nSet these on `media-gallery-root` or on `:root`.\n\n| Property | What it sets | Default | Available from |\n| --- | --- | --- | --- |\n| `--sc-media-gallery-max-width` | The widest the gallery gets. | 400px | v22.0.19 |\n| `--sc-media-gallery-max-height` | The tallest the image showing gets. The gallery narrows to keep the screen's shape for the frame, so the frame doesn't grow past it unless you also set `--sc-media-gallery-aspect-ratio`. | 100vh | v22.0.19 |\n| `--sc-media-gallery-aspect-ratio` | The shape of the frame, as width / height, in place of the screen's: 1/1, or 1.3 / 1 on a product card. | 1/1 | v22.0.19 |\n| `--sc-media-gallery-radius` | The corners of the frame. | unset | v22.0.19 |\n| `--sc-media-gallery-shadow` | The shadow around the frame, as a box shadow. | none | v22.0.19 |\n| `--sc-media-gallery-gap` | The space between the frame and the strip of thumbnails. | var(--sc-spacing-3) | v22.0.19 |\n| `--sc-media-gallery-nav-indicator-size` | The width and height of each dot. Not used on any screen yet. | 8px | v22.0.19 |\n| `--sc-media-gallery-thumbnail-size` | The width and height of each thumbnail. | 56px | v22.0.19 |\n| `--sc-media-gallery-thumbnail-border` | The border around each thumbnail. | 1px solid rgb(var(--sc-color-layer-dark) / 12%) | v22.0.19 |\n\n## Examples\n\nEach example is tested against the POS on every change.\n\n**\"Round the gallery's corners and drop the shadow.\"**\n\n```css\n\n[part~='media-gallery-root'] {\n  --sc-media-gallery-radius: 12px;\n  --sc-media-gallery-shadow: none;\n}\n```\n\n**\"Keep the gallery narrower.\"**\n\n```css\n\n[part~='media-gallery-root'] {\n  --sc-media-gallery-max-width: 280px;\n}\n```\n\n**\"Make the thumbnails bigger, with a lighter border.\"**\n\n```css\n\n[part~='media-gallery-root'] {\n  --sc-media-gallery-thumbnail-size: 72px;\n  --sc-media-gallery-thumbnail-border: 1px solid #e0e0e0;\n}\n```\n\n**\"Ring the thumbnail of the image showing in our brand color.\"**\n\n```css\n\n[part~='media-gallery-thumbnail']:where([aria-current='true']) {\n  outline-color: #0b5394;\n}\n```\n\n**\"Show the dot for the image showing in full.\"**\n\n```css\n\n[part~='media-gallery-dot']:where([data-active='true']) {\n  opacity: 1;\n}\n```\n\n**\"Make the previous and next buttons our brand color.\"** They are buttons, so set the button\nproperties:\n\n```css\n\n[part~='media-gallery-previous-button'],\n[part~='media-gallery-next-button'] {\n  --sc-button-bg: #0b5394;\n  --sc-button-color: #ffffff;\n}\n```\n\n**\"Take the background off the strip of thumbnails.\"**\n\n```css\n\n[part~='media-gallery-thumbnails'] {\n  background-color: transparent;\n}\n```\n\n## What can't be styled yet\n\n- The gallery on a product card apart from the one on a product's page or the bundle's dialog,\n  since no screen gives it a name yet\n- The swipe track inside the frame alone, apart from every other pager\n- How the previous and next buttons slide in while the pointer is over the gallery\n- Where the previous and next buttons sit on the frame, and where the dots sit\n- The height cap's arithmetic when you set the frame's shape: the gallery works out the narrowing\n  from the screen's shape, not yours\n\n## Retired\n\nNone yet."}