Skip to content

Checkout Plus Styling

How to Use Corso Custom CSS Variables in Your Code

This guide explains how to implement Corso’s custom CSS variables into your own site or Shopify theme using standard CSS and the :root{} selector. This will allow you to customize Corso’s checkout plus elements with ease.


What Are CSS Custom Properties?

CSS custom properties, also known as variables, let you define reusable values in one place and apply them across your stylesheets. This makes it easy to update designs consistently and maintain cleaner code.


Adding Custom Variables to Shopify

  1. Log in to your Shopify Admin Panel
  2. Navigate to: Settings > Checkout Plus
  3. Under Checkout Plus Elements you will be able to add Custom CSS to the Opt-Out Checkout Button or Checkout Plus Info.

🔧 Tip:

Be sure to include these variables inside the :root block in order to define them globally across your entire site. This allows you to reuse consistent styles (like colors, spacing, and fonts) without duplicating values, and makes updating your design as simple as changing one line. For example:

Checkout Plus Info:

:root {
--corso-info-bg-color: rgb(255, 0, 0);
--corso-modal-description-font-size: 100%;
}

Opt-Out Checkout Button:

:root {
--corso-button-padding: 10px;
}

Now that you understand the structure, simply paste any of the variables below into your Custom CSS field and watch the design transform effortlessly.

📋 Corso Variable Reference Tables


Checkout Plus Info Field Variables

VariableDescriptionExample
--corso-info-bg-colorBackground color of the info section--corso-info-bg-color: #f5f5f5;
--corso-info-border-colorBorder color (transparent = hidden)--corso-info-border-color: rgba(0, 0, 0, 0);
--corso-info-max-widthMax width of the container--corso-info-max-width: 100%;
--corso-info-paddingPadding inside the box--corso-info-padding: 5px;
--corso-info-marginOuter spacing--corso-info-margin: 0px;
--corso-info-border-radiusCorner roundness--corso-info-border-radius: 0px;
--corso-info-border-widthThickness of border--corso-info-border-width: 1px;
--corso-info-image-widthWidth of image in box--corso-info-image-width: 40px;
--corso-info-image-displayImage layout style--corso-info-image-display: inline;
--corso-info-label-font-sizeFont size of labels--corso-info-label-font-size: 85%;
--corso-info-label-font-weightThickness of label text--corso-info-label-font-weight: bold;
--corso-info-text-colorText color--corso-info-text-color:rgba(17, 0, 255, 0.5);
--corso-info-text-line-heightLine spacing--corso-info-text-line-height: 1;
--corso-info-description-font-sizeDescription font size--corso-info-description-font-size: 75%;
--corso-info-description-displayLayout of description--corso-info-description-display: flex;
--corso-info-description-text-alignText alignment--corso-info-description-text-align: left;

Checkout Plus Info Window Variables

VariableDescriptionExample
--corso-modal-text-colorModal text color--corso-modal-text-color: rgb(0, 0, 0);
--corso-modal-title-font-sizeTitle font size--corso-modal-title-font-size: 100%;
--corso-modal-description-font-sizeDescription font size--corso-modal-description-font-size: 100%;
--corso-modal-text-line-heightLine spacing in modal--corso-modal-text-line-height: 1.5;
--corso-modal-border-radiusRounded corners for modal--corso-modal-border-radius: 12px;
--corso-modal-box-shadowDrop shadow effect--corso-modal-box-shadow: 5px 5px 20px 7px #f5f5f5;

Opt-Out Checkout Button Variables

VariableDescriptionExample
--corso-button-max-widthButton max width--corso-button-max-width: 100%;
--corso-button-text-colorButton text color--corso-button-text-color: rgb(0, 0, 0);
--corso-button-text-decorationText styling (e.g. underline)--corso-button-text-decoration: underline;
--corso-button-border-colorButton border color--corso-button-border-color: #f5f5f5;
--corso-button-border-widthBorder thickness--corso-button-border-width: 0px;
--corso-button-paddingButton inner spacing--corso-button-padding: 0px;
--corso-button-marginButton outer spacing--corso-button-margin: 0px;
--corso-button-font-sizeFont size for button text--corso-button-font-size: inherit;
--corso-button-text-alignText alignment in button--corso-button-text-align: center;
--corso-button-border-radiusCorner style of button--corso-button-border-radius: 0px;

You can now reference these variables in your site’s CSS and component files for cleaner, more maintainable styles.

Visual Representation of Styles

Next, is a visual guide that demonstrates how select variables can affect the look and feel of Corso’s checkout components.