Skip to content

CSS variables reference

CSS variables (custom properties) are the primary mechanism for restyling stages from a theme without forking the plugin SCSS. For prose context and BEM classes see Storefront → CSS customization.

Source files: src/Resources/app/storefront/src/scss/base.scss (shell, close button, countdown, coupon) and src/Resources/app/storefront/src/scss/stage-grid.scss (grid layout).

Set on .p2lab-stage__shell and .p2lab-stage__shell-wrap.

VariablePurpose
--p2lab-stage-zZ-index of the stage. Default 9999.
--p2lab-stage-shell-widthDesigned shell width (px).
--p2lab-stage-shell-heightDesigned shell height (px).
--p2lab-stage-shell-padding-top / -right / -bottom / -leftInner padding around layers.
--p2lab-stage-shell-bg-colorBackground color.
--p2lab-stage-shell-bg-imageBackground image (url(...)).
--p2lab-stage-shell-bg-sizecover / contain / stretch / auto.
--p2lab-stage-shell-bg-poscenter, top, bottom, left, right, corners.
--p2lab-stage-shell-bg-repeatno-repeat / repeat / repeat-x / repeat-y.
--p2lab-stage-shell-backdrop-filterCSS backdrop-filter value (e.g. blur(8px)).
--p2lab-stage-shell-border-widthOuter border width.
--p2lab-stage-shell-border-stylenone / solid / dashed / dotted / double.
--p2lab-stage-shell-border-colorBorder color.
--p2lab-stage-shell-border-radiusCSS border-radius.
--p2lab-stage-shell-box-shadowCSS box-shadow value.

Most are driven by Stage Settings modal (Canvas / Background / Frame / Border sections).

Set on .p2lab-stage__close. Driven by Stage Settings → Close button style inspector.

VariablePurpose
--p2lab-stage-close-size / -width / -heightButton size.
--p2lab-stage-close-offsetPosition offset from the corner.
--p2lab-stage-close-colorIcon color.
--p2lab-stage-close-bg / --p2lab-stage-close-background-colorBackground color.
--p2lab-stage-close-background-imageBackground image.
--p2lab-stage-close-hover-bgBackground color on hover.
--p2lab-stage-close-padding-top / -right / -bottom / -leftInner padding.
--p2lab-stage-close-border-top-width / -right-width / -bottom-width / -left-widthBorder widths per side.
--p2lab-stage-close-border-top-style / -right-style / -bottom-style / -left-styleBorder styles per side.
--p2lab-stage-close-border-top-color / -right-color / -bottom-color / -left-colorBorder colors per side.
--p2lab-stage-close-border-top-left-radius / -top-right-radius / -bottom-left-radius / -bottom-right-radiusPer-corner radii.
--p2lab-stage-close-radiusShortcut for uniform radius.
--p2lab-stage-close-font-family / -font-size / -font-weightIcon character typography.
--p2lab-stage-close-box-shadowDrop shadow.
--p2lab-stage-close-opacityOpacity.
VariablePurpose
--p2lab-stage-slider-transition-msSlide-transition duration. Default 600ms.

Set on .p2lab-stage__layer of coupon-type layers.

VariablePurpose
--p2lab-coupon-code-colorCode text color.
--p2lab-coupon-code-font-family / -font-size / -font-weightCode typography.
--p2lab-coupon-code-letter-spacing / -line-heightTypography spacing.
--p2lab-coupon-code-text-decoration / -text-transformDecoration / casing.
--p2lab-coupon-copy-icon-colorIcon color.
--p2lab-coupon-copy-icon-opacityIcon opacity.
--p2lab-coupon-copy-icon-widthIcon size.
--p2lab-stage-coupon-copied-msgToast text content (content).

Set on .p2lab-stage__layer of countdown-type layers. The countdown has two text families (value digits + unit labels) plus per-unit box styling.

VariablePurpose
--p2lab-countdown-value-colorDigit color.
--p2lab-countdown-value-font-family / -font-size / -font-weightDigit typography.
--p2lab-countdown-value-letter-spacing / -line-heightTypography spacing.
--p2lab-countdown-value-text-decoration / -text-transformDecoration / casing.
VariablePurpose
--p2lab-countdown-label-colorLabel color.
--p2lab-countdown-label-font-family / -font-size / -font-weightLabel typography.
--p2lab-countdown-label-letter-spacing / -line-height / -opacityTypography spacing + alpha.
--p2lab-countdown-label-text-decoration / -text-transformDecoration / casing.

Per-side borders + radii + paddings:

VariablePurpose
--p2lab-countdown-unit-background-colorBox background.
--p2lab-countdown-unit-border-top-color / -right-color / -bottom-color / -left-colorBorder colors per side.
--p2lab-countdown-unit-border-top-style / -right-style / -bottom-style / -left-styleBorder styles per side.
--p2lab-countdown-unit-border-top-width / -right-width / -bottom-width / -left-widthBorder widths per side.
--p2lab-countdown-unit-border-top-left-radius / -top-right-radius / -bottom-left-radius / -bottom-right-radiusPer-corner radii.
--p2lab-countdown-unit-padding-top / -right / -bottom / -leftInner padding per side.

From stage-grid.scss. Apply when Content mode = Grid (responsive columns).

VariablePurpose
--p2lab-section-gapGap between rows.
--p2lab-section-paddingInner padding.
--p2lab-section-max-widthMax width before centering.
--p2lab-section-bgBackground.
--p2lab-section-alignalign-items.
VariablePurpose
--p2lab-row-gapGap between columns.
--p2lab-row-mobile-gapGap on <640px.
--p2lab-row-alignalign-items.
--p2lab-row-justifyjustify-content.
VariablePurpose
--p2lab-col-xs / -sm / -md / -lg / -xl / -xxlFlex-basis per breakpoint.
--p2lab-col-paddingInner padding.
--p2lab-col-gapGap between content layers.
--p2lab-col-alignalign-items.
--p2lab-col-justifyjustify-content.
--p2lab-col-bgBackground.