Custom CSS

Custom CSS

Start your free trial
Start your free trial

General

Online store speed
Online store speed
Accessibility
Accessibility
Theme updates
Theme updates

Theme styles

Style presets
Style presets
Colors
Colors
Fonts
Fonts
Animation
Animation
Social media
Social media

Header

Announcement bar
Announcement bar
Mobile menu
Mobile menu
Search bar
Search bar

Sections

Products

Product listings
Product listings
Product badges
Product badges
Quick view
Quick view
Quick add
Quick add

Product page

Product template
Product template
Variant chips
Variant chips
Sticky add-to-cart bar
Sticky add-to-cart bar
Sibling product swatches
Sibling product swatches
Product recommendations
Product recommendations

Collection page

Collections template
Collections template
Banner
Banner
Product grid
Product grid
Filters and sorting
Filters and sorting

Cart

Quick cart
Quick cart
Cart page
Cart page
Added-to-cart popup
Added-to-cart popup
Cross sells
Cross sells
Free shipping bar
Free shipping bar
Low inventory warning
Low inventory warning

Pages

Templates
Templates
Home page
Home page
About page
About page
Blogs page
Blogs page
Blog post
Blog post
Collections list
Collections list
Contact page
Contact page
Password page
Password page
Search page
Search page
404 page
404 page

Support

Support policy
Support policy
Shopify vs Theme issues
Shopify vs Theme issues
Store access requests
Store access requests

Advanced: Custom CSS

Note | We do not support code customizations. This guide offers a basic reference for advanced users familiar with HTML and CSS. Always test code changes on a duplicated, unpublished version of your theme. For assistance, we recommend finding a professional developer through Shopify Experts or Task Husky.

Understanding CSS basics

Your theme uses Cascading Style Sheets (CSS) to define the appearance and layout of your online store. CSS allows you to apply styles (such as colors, position, or size) to elements of your site (such as headings, images, buttons).

Below, we cover the most basic elements of CSS code used to add custom styles. Understanding these basic elements will help you avoid common code errors.

CSS code uses a simple syntax made up of selectors and declarations. Selectors target which elements to style, while declarations apply desired styles to selected elements. Declarations are always contained within curly braces ({}).

.selector-name {
  property: value;
}

Declarations consist of a property and a value, separated by a colon. The property is the aspect of the element that will be styled, such as the color or font size. The value is the specified setting for the property, such as red#FF0000, or 12px.

To learn more about using CSS, we recommend consulting resources like MDN Web Docs and W3 School Tutorials.

Using Custom CSS in theme editor

In the theme editor, you can use the Custom CSS setting to apply styles to elements on your site, without needing to edit any theme code files.

You can add custom CSS to your entire theme (in Theme settings) or to individual sections (in Section settings). We recommend using Custom CSS for minor style changes.

Before adding custom code, always duplicate your current theme and use the unpublished theme copy to test your changes.

Note | To find the selector names used in your theme, you will need to use your browser's Inspector tool. There are some limitations to using selectors. See Shopify's guide on Considerations for using custom CSS.
icon
STEPS

In your Shopify Admin:

  1. Click Duplicate on your current theme.
  2. Click Customize on the duplicated, unpublished theme version.

In your theme editor (Customize):

  1. To apply custom styles to your entire theme, go to Theme settings > Advanced. To apply custom styles to individual sections, click on the Section.
  2. image
  3. Click to open the Custom CSS tab.
  4. Enter or paste the CSS code into the Custom styles box.
  5. Click Save.
  6. Click Preview to review your changes.
  7. Use the preview link to further test your changes on multiple browsers and devices.

  8. After testing, you can go to your Theme library to Publish the duplicated theme with your changes.

Using custom.css file

While we recommend using the available Custom CSS settings in the theme editor, Cornerstone includes a custom.css file in the Styles folder.

Enable useCustomCSS

To import the custom.css file, you need to enable useCustomCSS in the theme-globals.liquid file.

icon
STEPS
  1. Open the theme-globals.liquid file in the Snippets folder.
  2. Find the useCustomCSS variable and set it to true.
  3. {% assign useCustomCSS = false %}
How's Cornerstone working for you?

We built Cornerstone with developers in mind, and we want to hear from you about what you're building. Please feel free to reach out with questions or introduce yourself by e-mailing us at developers@fluorescent.co