Fluorescent
Eclipse
Eclipse
  • Get started
    • Migrating to Eclipse
    • Theme license
  • FAQs
  • Changelog
    • Update your theme
  • General
    • Editing themes
      • Dynamic content with metafields
      • Edit default theme content
      • Multiple languages
      • Unique content for markets
      • Customizing your site
      • H1 heading tags
    • Image guide
      • Web ready photography
      • Image sizes
      • File formats
      • Theme image settings
    • SEO for Shopify
    • Online store speed
    • Accessibility
  • Theme settings
    • Theme settings
      • Social media
    • Theme styles
    • Fonts
    • Colors
  • Corner rounding
  • Pages
    • Page templates
      • Using templates
      • Customize page styles
      • Create and assign templates
    • Demo layouts
    • About page
    • Home page
    • Blog page
    • Blog post
    • Contact page
    • Password page
    • Search page
  • Sections
    • Sections
      • Using sections
      • Content blocks
    • Blog posts
    • Collapsible content
    • Collection list
    • Contact form
    • Featured collection
    • Featured links
    • Feature product
    • Grid
    • Icon with text columns
    • Image hero
    • Image with text
    • Multi-column
    • Newsletter
    • Rich text
    • Scrolling content
    • Shop the look
    • Shoppable feed
    • Slideshow
    • Video
    • Video hero
    • Video with text
    • Custom Liquid
  • Header
    • Announcement bar
    • Header
      • Layout and style
      • Logo
      • Transparent header
      • Mega menu
      • Language and Currency
    • Impact logo
    • Search
  • Footer
    • Footer
      • Image Text and Socials
      • Links block
      • Newsletter and Socials
      • Language and Currency
      • Custom Liquid
  • Products
    • Product listings
      • Product card styles
      • Sale and sold out badges
      • Quick shopping
    • Prices and currencies
    • Swatches
      • Use default colors
      • Use custom colors
      • Use custom images
  • Product pages
    • Product page
      • Gift card product
    • Media gallery
      • Media grouping
    • Product overview blocks
      • Description
      • Price
      • Buy buttons
      • Collapsible row
      • Complementary products
      • Custom option
      • Featured icon with text
      • Icon with text
      • Inventory status
      • Image block
      • Popup block
      • Product rating
      • Text block
      • Share icons
      • Custom Liquid
    • Variant selector
      • Info popup
    • Sticky add-to-cart
    • Sibling products
    • Product recommendations
  • Collections
    • Collection page
      • Banner
      • Product grid
      • Promotion tiles
      • Filters and sorting
    • Collection list page
  • Cart
    • Cart
    • Free shipping bar
    • Cross sells
  • Popups
    • Popups
  • Support
    • Support policy
    • Shopify vs Theme issues
    • Store access requests
  • Advanced
    • Custom CSS
    • Custom fonts
Powered by GitBook
On this page
  • Understanding CSS basics
  • Using Custom CSS in theme editor
  • Using custom.css file

Was this helpful?

  1. Advanced

Custom CSS

Last updated 4 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, Eclipse 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.

STEPS
  1. Open the theme-globals.liquid file in the Snippets folder.

  2. Find the useCustomCSS variable and set it to true.

    
    {% assign useCustomCSS = false %}
    
verified Fluorescent partner
MDN Web Docs ↗
W3 School Tutorials
Inspector tool ↗
Considerations for using custom CSS ↗