Style the cart drawer with CSS
Updated Nov 9, 20267 min read
On this page (10)
Use CSS to change what the Design panel doesn't cover. For colors and fonts without code, see Templates, colors and fonts.
Add your CSS
- Open Advanced in the cart editor.
- Add your code to Custom CSS. Set variables on
hype-cart-drawer, and style parts withhype-cart-drawer::part(name). - Click Save.
- Check the result on your store. The editor preview doesn't show Custom CSS.
Variables
Defaults are for the Bold template. Noir, Atelier and the Design panel change some of them. A variable you set overrides all three, except where the table says otherwise.
Colors
| Variable | Changes | Default |
|---|---|---|
--hype-cd-bg | Drawer background | #ffffff |
--hype-cd-text | Main text | #161616 |
--hype-cd-heading | Drawer title, subtotal amount and bold words in the progress bar headline | The text color |
--hype-cd-text-2 | Close button, quantity buttons and trust badge icons | 78% of the text color |
--hype-cd-muted | Variant names, summary rows, footnotes and trust badge labels | 68% of the text color |
--hype-cd-faint | Crossed-out prices and the remove icon | 56% of the text color |
--hype-cd-border | Divider lines and product image borders | #ebeae7 |
--hype-cd-border-strong | Borders of the discount field, quantity stepper and Apply | 16% of the text color |
--hype-cd-surface-2 | Discount chips, Apply and hover backgrounds | 4.5% of the text color |
--hype-cd-surface-3 | Item count, progress bar track and locked goal icons | 8% of the text color |
--hype-cd-control-bg | Backgrounds of the discount field and quantity stepper | The drawer background |
--hype-cd-knob | Shipping protection toggle knob | #ffffff |
--hype-cd-overlay | Dimmed page behind the drawer | rgba(22, 22, 22, 0.5) |
--hype-cd-primary | Progress bar fill, unlocked goal icons, shipping protection icon and gift prices | The accent color |
--hype-cd-on-accent | Icons and text on --hype-cd-primary | #ffffff |
--hype-cd-tint | Product recommendations and Free gifts cards, and the shipping protection icon background | 5% of the accent color |
--hype-cd-tint-strong | Glow around the focused discount field and the next goal | 12% of the accent color |
--hype-cd-savings | Savings amounts and the "to go" note | The accent color |
--hype-cd-selection | Selected text | 30% of the accent color |
--hype-cd-focus | Keyboard focus outlines and the focused discount field | The accent color |
--hype-cd-badge-bg, --hype-cd-badge-color | Background and text of the Save badge on products and the badge on recommended products | 10% of the accent color, the accent color |
--hype-cd-banner-bg, --hype-cd-banner-text, --hype-cd-banner-timer | Announcement bar background, text and countdown, unless set in the module | 10% of the accent color, the text color, the title color |
Buttons
| Variable | Changes | Default |
|---|---|---|
--hype-cd-cta-bg, --hype-cd-cta-color | Background and text of the checkout button, launcher and Add buttons | The accent color, #ffffff |
--hype-cd-cta-radius | Checkout button corners | 12px |
--hype-cd-cta-height | Checkout button height | 54px, 50px on phones |
--hype-cd-cta-size | Checkout button text size | 15px |
--hype-cd-cta-weight | Text weight of the checkout and Add buttons | 600 |
--hype-cd-cta-transform, --hype-cd-cta-tracking | Case and letter spacing of the checkout, Apply, Continue shopping and Add buttons | none, 0 |
--hype-cd-cta-shadow | Shadow of the checkout button and launcher | A soft glow in the accent color |
--hype-cd-cta-shadow-hover | Checkout button shadow on hover | A soft glow in the accent color |
--hype-cd-secondary-bg, --hype-cd-secondary-color, --hype-cd-secondary-border | Background, text and border of Apply and Continue shopping | --hype-cd-surface-2, --hype-cd-text, --hype-cd-border-strong |
--hype-cd-pill-radius | Corners of Add buttons, the recommendations carousel arrows and the gift badge | 999px |
Sizes and spacing
| Variable | Changes | Default |
|---|---|---|
--hype-cd-width | Drawer width on desktop. Drawer width overrides CSS, so set it there | 420px |
--hype-cd-pad-x | Left and right padding of the drawer | 24px |
--hype-cd-section-pad-x | Left and right padding of modules in the Top bar | --hype-cd-pad-x |
--hype-cd-panel-radius | Drawer corners with Floating | 16px |
--hype-cd-float-gap | Gap from the screen edges with Floating | 12px |
--hype-cd-panel-shadow | Drawer shadow, on Bold only | A soft shadow |
--hype-cd-card-radius | Corners of Product recommendations and Free gifts cards | 14px |
--hype-cd-control-radius | Corners of the discount field, Apply, quantity stepper and shipping protection icon | 70% of the corner radius |
--hype-cd-badge-radius | Corners of badges, discount chips and the item count | 999px |
--hype-cd-thumb-size | Product image size in Products in cart | 68px |
--hype-cd-thumb-radius | Product image corners | 70% of the corner radius |
--hype-cd-thumb-fit | How product images fit: cover crops, contain shows the whole image | cover |
--hype-cd-thumb-padding | Space inside the product image | 0px |
--hype-cd-thumb-bg, --hype-cd-thumb-border | Product image background and border | --hype-cd-surface-2, --hype-cd-border |
--hype-cd-row-gap | Space above and below each product | 18px, 16px on phones |
--hype-cd-divider | Every divider line. none removes them | 1px solid in the border color |
--hype-cd-header-rule | Line under the header | none |
--hype-cd-stepper-height | Quantity stepper height | 32px |
--hype-cd-control-height | Height of the discount field, Apply and Continue shopping | 44px |
--hype-cd-trust-icon-size, --hype-cd-trust-icon | Trust badge icon size and color | 15px, --hype-cd-text-2 |
--hype-cd-mark-height, --hype-cd-mark-radius, --hype-cd-mark-border | Payment logo height, corners and border color | 22px, 0px, transparent |
--hype-cd-mark-gap, --hype-cd-marks-align | Space between payment logos, and their alignment | 6px, center |
Text
| Variable | Changes | Default |
|---|---|---|
--hype-font | Body font. Applies only while Font is Theme font | Your store's font |
--hype-cd-font-heading | Font of the title and module headings. Applies only while Heading font is Same as body | The body font |
--hype-cd-title-size | Drawer title size | 16px |
--hype-cd-heading-weight, --hype-cd-heading-transform, --hype-cd-heading-tracking | Weight, case and letter spacing of the title and module headings | 600, none, -0.01em |
--hype-cd-body-size | Product names, prices and the subtotal label | 14px |
--hype-cd-small-size | Variant names, summary rows and footnotes | 12.5px |
--hype-cd-label-size, --hype-cd-label-weight, --hype-cd-label-transform, --hype-cd-label-tracking | Trust badge labels | 10.5px, 600, uppercase, 0.07em |
--hype-cd-item-title-weight | Product name weight | 500 |
--hype-cd-price-weight | Price and subtotal weight | 600 |
--hype-cd-badge-tracking | Letter spacing of badges and chips | 0.04em |
--hype-cd-numerals | Number style of amounts | "tnum" 1, "lnum" 1 |
Background texture
| Variable | Changes | Default |
|---|---|---|
--hype-cd-panel-texture | An image tiled over the drawer background | none |
--hype-cd-panel-texture-opacity | How strong the image is | 0 |
--hype-cd-panel-texture-blend | How the image blends with the background | multiply |
Parts
A part styles one element directly.
| Part | What it is |
|---|---|
launcher, overlay | The floating cart button and the dimmed page behind the drawer |
drawer, header, title, count, close | The drawer, its header, the title, the item count and the close button |
announcement, timer | Announcement bar and its countdown |
goals, goal-headline, goal-track, goal-fill, goal-node, goal-icon | Progress bar: the module, headline, track, filled part, each goal and its icon |
trust, trust-badge | Trust badges: the row and one badge |
item, item-thumb, item-title, item-variant, item-price, item-remove | Products in cart: one product, its image, name, variant, price and remove button |
stepper, stepper-decrement, stepper-count, stepper-increment | Quantity stepper: the whole control, minus button, number and plus button |
gift-badge | The badge on a free gift in Products in cart |
upsell, upsell-heading, upsell-card, upsell-add | Product recommendations: the module, heading, one product and its Add button |
gifts, gifts-heading, gift-card, gift-image, gift-title, gift-price, gift-variant, gift-add | Free gifts: the module, heading, one gift, its image, name, price, variant menu and Add button |
protection, toggle-track, toggle-knob | Shipping protection: the module and its toggle |
field, apply, chip | Discount code: the field, Apply and one applied code |
summary-row, subtotal, subtotal-value, summary-note | Summary: one row, the subtotal line, its amount and Note under the subtotal |
checkout | Checkout button |
marks, mark | Payment logos: the row and one logo |
footnote | The footnote under Checkout button or Payment logos |
custom-text, custom-html | Custom text and Custom HTML |
Example
This makes the checkout button taller and rounder, and shows whole product images:
hype-cart-drawer { --hype-cd-cta-height: 60px; --hype-cd-thumb-fit: contain;}hype-cart-drawer::part(checkout) { border-radius: 999px;}Good to know
- Regular CSS selectors can't reach inside the drawer. Use the variables and parts above.
- The empty cart message, Continue shopping, the total inside the checkout button and trust badge icons have no part. Style them with variables.
- Custom JavaScript is in the same panel. It runs once per page load, on pages where the drawer appears.
- If your CSS doesn't show on your store yet, see Changes aren't showing yet.
- If you can't make this change yourself, message us and our team will help.
Was this article helpful?
Related articles
The cart editorThe cart editor has your settings on the left and a live preview on the right. To open it, click a cart's name on Home . Add and arrange modules…Nov 9, 2026Templates, colors and fontsA template sets the drawer's colors, corner radius, fonts and width in one click. You pick one when you create a cart, and you can change it any…Nov 9, 2026Drawer size, panel style and launcherThe cart editor's General panel sets the drawer's heading, its width and shape on desktop, and the floating cart button. Set it up Open General in…Nov 9, 2026Translate your cart drawerYou translate the drawer's text one field at a time, into the languages your store publishes. The translate icon only shows when your store publishes…Nov 9, 2026
Still stuck?
Ask a follow-up and we'll see it came from “Style the cart drawer with CSS”.
Opens chat with your question and a link to this article.