Custom CSS
- Shopify CDN
- Shopify documentation on adding custom CSS to your theme
- Shopify admin Themes
- Shopify documentation on theme support
- Shopify developer documentation on section schema tags
- Shopify documentation on web performance
- Shopify developer documentation on custom fonts
- Shopify documentation on additional support resources
- Shopify documentation on custom CSS
- Shopify documentation on templates
Add custom CSS
Section titled “Add custom CSS”Custom CSS lets you make styling changes to your Align theme when its built-in settings do not provide the result you need. Use it carefully, and test changes before publishing them to your live store.
Apply CSS across your Align theme
Section titled “Apply CSS across your Align theme”Use theme-level CSS for changes that should appear throughout your store, such as button styling.
- In your Shopify admin, go to Online Store > Themes
- Find Align, then click Customize.
- Click Theme settings.
- Click Custom CSS.
- Add your code.
- Click Save.
Theme-level CSS applies to all store pages except Checkout and is limited to 1,500 characters.
Apply CSS to one section
Section titled “Apply CSS to one section”Use section-level CSS when a change should affect only one section, such as its font size or background color.
- In your Shopify admin, go to Online Store > Themes
- Find Align, then click Customize.
- Select the section that you want to style.
- At the bottom of the section properties panel, click Custom CSS.
- Add your code.
- Click Save.
Section-level CSS is scoped to the selected section and is limited to 500 characters.
Work within custom CSS limits
Section titled “Work within custom CSS limits”Custom CSS requires familiarity with CSS and HTML. For Align-specific guidance, start with Company XYZ support. For Shopify platform limitations and general theme support information, review the available theme support
- Use supported rules.
@import,@charset, and@namespaceare not supported. In section-level CSS, only@media,@container,@layer, and@supportsat-rules are allowed. - Target section content carefully. Section-level CSS cannot target the ID or classes on the section’s outer wrapper. A rule that begins with the parent wrapper tag is treated as a descendant rule within that section. The wrapper is usually a
<div>, but themes can use other permitted values - Use approved asset URLs. URLs in custom CSS can use only the
https://cdn.shopify.comdomain. - Consider font performance. Custom fonts are allowed, but browsers download them before rendering text. Test their effect on store performance, and review how to use custom fonts in your theme
- Retest after theme updates. Changes to theme markup, selectors, or classes can cause existing custom CSS to stop working.
If you receive an error that you cannot resolve, contact Company XYZ support for Align guidance and review Shopify’s additional support resources for platform help.
Usage notes
Section titled “Usage notes”- Start with built-in settings. Use custom CSS only when the available Align theme controls do not provide the result you need.
- Keep rules focused. Use theme-level CSS for shared styling and section-level CSS for local adjustments.
- Check every screen size. Test changes on desktop and mobile before publishing.
- Save a copy of your rules. Keep your CSS somewhere accessible so you can restore or update it after a theme update.