Custom CSS
How to restyle parts of your theme with your own CSS, and how to use the variables themes expose.
Updated
Most look changes already have a setting, so check theme settings first. For anything else, add CSS yourself in one of two ways. Some themes also have a Custom CSS field. If yours does, use it. See your theme's guides.
Option 1: a style tag in Custom Liquid
- Add a Custom Liquid section or block. See Custom Liquid.
- Paste your rules inside a
styletag.
<style>
.your-class { margin-top: 8px; }
</style>
This is stored with the page, so it stays when you update, but it applies only where you add it.
Option 2: edit the theme's CSS
Open the code editor and change the stylesheet, or add a new one. This applies on every page, but your edits are not carried over when you update. See Editing code.
CSS variables
Themes usually write their settings into CSS variables on the page, such as fonts, page width, corner radius and the colors of the active color scheme. Use your browser's inspector to see the names your theme uses. When you write var(--your-variable) instead of a fixed color, your styling follows color scheme changes.
Related
Still stuck? Get theme support