Hype Bundles

Offer block CSS variables

Updated Sep 10, 20264 min read

Every color, radius, size and weight in a Hype Bundles offer block is a --hype-* custom property. Set any of them on the block, on its offer class, or on any ancestor — custom properties inherit through the shadow boundary.

body {  --hype-card-radius: 4px;  --hype-font-heading: 'Fraunces', Georgia, serif;}

Defaults below are the built-in look. A default written as a percentage is a color-mix() of the text or accent color toward the card background, so it stays legible on a dark card; browsers without color-mix() get fixed greys instead.

Do not set --hype-ac by hand. The tint steps --hype-ac-04, -05, -06, -07, -10, -12, -30, -35, --hype-ac-glow and --hype-ac-soft are computed in JavaScript from the accent, and a manual --hype-ac leaves them stale.

Paper and ink

VariableDefaultControls
--hype-card-bgtransparentCard background. Neutrals and tints mix toward it, so on the default transparent card they are translucent ink
--hype-text#161616Primary text
--hype-headingvar(--hype-text)Block title, tile totals, category names
--hype-text-2text 90%Secondary copy: row prices, notes, the "was" price beside a "now"
--hype-mutedtext 80%Labels, hints, sub-copy, the sum line's label
--hype-fainttext 66%Struck-through prices, unavailable options
--hype-card-bordertransparentThe card frame only
--hype-bordertext 14%Row hairlines, thumbnail frames, the base for tile borders
--hype-tile-bordervar(--hype-border)Option tiles, category and step frames
--hype-border-strongtext 24%Selects, radios and checks at rest, secondary buttons
--hype-surface-2text 5%Neutral badges, secondary buttons, image placeholders
--hype-surface-3text 9%Disabled CTAs
--hype-control-bgvar(--hype-card-bg)Tiles, selects, radios, checks, outline pills
--hype-error#b42318The CTA failure line
--hype-divider1px solid var(--hype-border)The rule between rows and above the sum line

Accent-driven

VariableDefaultControls
--hype-on-accent#ffffffText and icons drawn on a solid accent (checks, solid badges)
--hype-tintaccent 7% over cardSelected tile background
--hype-tint-strongaccent 14% over cardTinted pills
--hype-badge-bgaccent 12% over cardAccent badges (Save $X, count pills)
--hype-accent-textaccent 72% toward textThe accent wherever it is used as text, kept readable on dark cards
--hype-badge-colorvar(--hype-accent-text)Text on accent badges
--hype-savingsvar(--hype-accent-text)"You save" copy, the selected tier's note
--hype-focusvar(--hype-ac)Keyboard focus outlines
--hype-selectionaccent 30% over cardText selection highlight
--hype-strip-bgtransparentBackground of the sum line. Pair with ::part(strip) padding and radius to make it a panel again

Buttons

VariableDefaultControls
--hype-cta-bgvar(--hype-ac)CTA background, solid pills, outline pill border and text
--hype-cta-color#ffffffCTA text
--hype-cta-height52pxCTA height
--hype-cta-radius12pxCTA and code-input radius
--hype-cta-font-size1emCTA text size
--hype-cta-weight600CTA font weight
--hype-cta-transformnoneCTA text-transform
--hype-cta-tracking0CTA letter-spacing
--hype-cta-shadow0 12px 24px -14px var(--hype-ac-glow)CTA shadow at rest; set none for flat buttons
--hype-cta-shadow-hover0 16px 30px -14px var(--hype-ac-glow)CTA shadow on hover
--hype-cta-disabled-bgvar(--hype-surface-3)Locked CTAs
--hype-cta-disabled-colorvar(--hype-faint)Locked CTA text
--hype-secondary-bgvar(--hype-surface-2)Quiet buttons (Back in the options modal)
--hype-secondary-colorvar(--hype-text)Quiet button text
--hype-secondary-bordervar(--hype-border-strong)Quiet button border
--hype-pill-radius999pxPills and step chips

Geometry

VariableDefaultControls
--hype-card-radius18pxCard corners (visible once the card has a background or border)
--hype-card-padding0pxCard inner padding
--hype-card-shadownoneCard drop shadow
--hype-tile-radius14pxOption tiles, category and step frames, code rows
--hype-control-radius8pxSelects, checkboxes, secondary buttons
--hype-badge-radius999pxBadges
--hype-thumb-radius10pxProduct thumbnails and builder picture tiles
--hype-thumb-fitcontainobject-fit for thumbnails; use cover for edge-to-edge photography
--hype-thumb-padding3pxInset between a thumbnail's frame and its image
--hype-thumb-bgvar(--hype-control-bg)Thumbnail frame background
--hype-thumb-bordervar(--hype-border)Thumbnail frame border
--hype-row-thumb-size48pxThumbnails in list rows (lineup, bought-together, add-ons)
--hype-lineup-thumb-size72pxThe showcase's "A + B + C" lineup thumbnails
--hype-row-gap12pxVertical padding of a list row
--hype-block-max-width100%Widest the block renders
--hype-block-spacing16pxSpace above and below the block, and between two stacked blocks

Type

VariableDefaultControls
--hype-fontinheritFont family inside the block
--hype-font-headinginheritFont family of the block title
--hype-title-size1.35emBlock title size (the customizer writes px)
--hype-title-weight600Block title weight
--hype-title-transformnoneBlock title text-transform
--hype-title-tracking-0.015emBlock title letter-spacing
--hype-eyebrow-sizevar(--hype-label-size)Eyebrow size
--hype-eyebrow-weight600Eyebrow weight
--hype-eyebrow-transformuppercaseEyebrow text-transform
--hype-eyebrow-tracking0.08emEyebrow letter-spacing
--hype-eyebrow-colorvar(--hype-muted)Eyebrow and section labels
--hype-body-size1emBase text size. 1em inherits the theme
--hype-small-sizevar(--hype-body-size)Kept for compatibility; subdued text is body-sized
--hype-strong-size1.125emEvery "now" amount
--hype-label-size0.75emMicro-caps labels, eyebrows, badges
--hype-label-tracking0.06emMicro-caps letter-spacing
--hype-price-weight600Weight of every "now" price
--hype-total-size1.35emThe sum line's total
--hype-numerals"tnum" 1, "lnum" 1OpenType features applied to every amount (tabular, lining)

Modals

The options modal and the discount-code modal read all of the variables above — the same card colors, radii and CTA tokens — plus these:

VariableDefaultControls
--hype-modal-width360px; the options modal 560pxPanel width on desktop
--hype-modal-bgvar(--hype-card-bg, #ffffff)Panel background (white when the card is transparent)
--hype-modal-radiusvar(--hype-card-radius)Panel corners, and the top corners of the phone sheet
--hype-modal-padding22pxPanel padding
--hype-modal-shadow0 24px 60px -12px rgba(0, 0, 0, 0.45)Panel shadow
--hype-backdroprgba(24, 23, 22, 0.55)Backdrop color

Modals are appended to the document rather than nested in the block, so set modal variables on body or on the modal element itself — setting them on the block that opens the modal has no effect.

Related articles

Still need help?

Start a chat and we'll pick it up right here.