Fluorescent
Spark
Spark
  • Spark Help Center
    • Start using Spark
      • Migrate your theme
      • Theme licenses
    • FAQs
    • Changelog
  • General
    • Editing themes
      • Adding sections
      • Using templates
      • Accessibility
      • Customizing your site
      • H1 headings tags
      • SEO for Shopify themes
      • Online store speed
    • Image guide
      • Web ready photography
      • Image sizes
      • File formats
      • Theme image settings
    • Adapting theme content
      • Edit default theme content
      • Multiple languages
      • Dynamic content with metafields
      • Unique content for markets
    • Update your theme
      • Upgrade to OS2
  • Theme styles
    • Theme settings
    • Style presets
    • Fonts
    • Colors
    • Animation
    • Buttons
  • Pages
    • Templates
      • About page
      • Blogs page
      • Blog posts template
      • Collections list page
      • Contact page
      • FAQ page
      • Lookbook page
      • Password page
      • Search page
      • 404 page
      • Home page
    • Sections
      • Blog posts
      • Collection list
      • Countdown banner
      • Events
      • Featured collection
      • Featured collection row
      • Featured product
      • Image with features
      • Image with text
      • Inline features
      • Logo list
      • Map
      • Mosaic grid
      • Newsletter
      • Questions and answers
      • Quotes
      • Rich text
      • Shoppable feature
      • Shoppable image
      • Slideshow
      • Social proof
      • Testimonials
      • Text columns with images
      • Video
      • Video hero
    • Popups
  • Header
    • Header
      • Logo
      • Layout and style
      • Transparent header
      • Customer account link
    • Announcement bar
    • Quick search
  • Footer
    • Footer
      • Links block
      • Newsletter block
      • Text and image block
      • Payment icons
      • Language selector
      • Country selector
      • Social media icons
      • Footer text
  • Products
    • Product listings
    • Hover add-to-cart
  • Cart
    • Cart page
    • Fly-out cart
  • Product pages
    • Product template
      • Pre-order template
      • Alternate product template
    • Layout and style
      • Breadcrumbs
      • Navigation buttons
      • Media gallery
      • Quick purchase bar
      • Gift recipient form
    • Product overview blocks
      • Default blocks
        • Title
        • Price
        • Description
        • Variant selector
        • Quantity selector
        • Buy buttons
        • Local pickup banner
        • Share icons
      • Accordion block
      • Complementary products
      • Custom text field
      • Information popup
      • Payment accordion
      • Security accordion
      • Shipping accordion
      • Stock level indicator
      • Text block
      • App blocks
    • Product page sections
      • Product reviews
      • Recommended products
    • Variant options
      • Variant chips
      • Variant swatches
        • Use default colors
        • Use custom colors
        • Use custom images
        • Show on product cards
        • Dynamic option availability
      • Sibling product swatches
  • Collection pages
    • Collection template
    • Banner
    • Product grid
    • Filters and sorting
  • Support
    • Support policy
    • Shopify vs Theme issues
    • Store access requests
  • For developers
    • Custom CSS
    • Custom fonts
    • Custom Liquid
    • Custom JavaScript events
    • Edit Theme JavaScript
Powered by GitBook
On this page
  • Understanding CSS basics
  • Using Custom CSS in theme editor
  • Using custom.css file

Was this helpful?

  1. For developers

Custom CSS

Advanced

Last updated 3 months ago

Was this helpful?

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 unpublished theme copies. For assistance, we recommend reaching out to a .

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 and .

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.

To find the selector names used in your theme, you will need to use your browser's . There are some limitations to using selectors. See Shopify's guide on .

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. Click to open the Custom CSS tab.

  3. Enter or paste the CSS code into the Custom styles box.

  4. Click Save.

  5. Click Preview to review your changes.

    Use the preview link to further test your changes on multiple browsers and devices.

  6. 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, Spark includes a custom.css file in the Styles folder.

Always duplicate your current theme before making edits to the code. Use the unpublished version to add and test customizations before publishing your theme.

How's Spark working for you?

Related links

We built Spark 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
Edit theme JavaScript
Custom JavaScript events
Custom Liquid
Custom fonts
verified Fluorescent partner
MDN Web Docs ↗
W3 School Tutorials
Inspector tool ↗
Considerations for using custom CSS ↗