Checkout styles
This topic introduces you to the CSS classes for each UI component used in the checkout drop-in component and shows you how to override these classes to customize the component’s CSS styling to match your brand.
Big Picture
The quickest way to override checkout CSS is to inspect the checkout UI from your browser’s developer tools to discover the BEM class names you want to add to or override. This process is numbered in the image below.
- Inspect the element in the UI that you want to customize (right-click on the element and select “Inspect” from the menu).
- Identify the CSS class(es) for the element. We use BEM naming, which makes it easy to know which component you’re changing (and which CSS file to use).
- Copy the CSS class names to override to your custom CSS file.
How to override the checkout styles
Create a new CSS file in your project for the checkout component. Name the file
custom-checkout.css
.Copy the BEM class names displayed in the Element tab of the developer panel into your new file.
Add your custom CSS rules to the
custom-checkout.css
file to add or override the default styles.Import the custom CSS file into the
commerce-checkout.css
file.Save the file and refresh your browser to see the changes.
Example CSS overrides
The following example shows how to override two of the many classes for the checkout1 component.
Checkout CSS classes
The CSS classes for each checkout component are provided here.