CSS

Use Orbe CSS to customize your storefront

Developers only: This documentation is intended for developers with technical knowledge and experience in Shopify Theme Development.

User Location

To customize your theme files, you can use CSS variables to add your styles. Orbe adds a custom class to the body element of the theme, which can be used to apply customizations throughout the entire theme.

The CSS class is named orbe-country-code--COUNTRYCODE, where COUNTRYCODE is the ISO two-letter code (alpha-2) of the country where the customer is located. For example, if the customer is in the United Kingdom, the following class will be added to the body element:

<body class="orbe-country-code--GB"></body>

You can find the global list of country ISO two-letter codes at https://countrycode.org/.

You can add your custom CSS in the Advanced CSS section inside Orbe: Custom CSS. This ensures the CSS is always available in any theme where the Orbe app is enabled.

Country Flags

If you want to customize your Shopify store and display the flag of any country, Orbe provides a set of auxiliary classes that can be used. These classes enable you to incorporate country flags into your design in various ways.

The country selectors mentioned here are just one example of how you can utilize these classes.

Usage Example:

To display the flag of Australia, you can use the following HTML:

<div class="orbe-flags-au"></div>

This will render the flag of Australia as the background image of the <div> element.

You can replace "au" in the class name with the appropriate two-letter country code to display the flag of any desired country.

You can even use liquid code to show the country flag of the current experience dynamically. For example:

<div class="orbe-flags-{{ localization.country.iso_code | downcase }}"></div>

This will dynamically render the flag of the current country experience by retrieving the appropriate country code from the localization object.

Please note that the provided classes are not limited to selectors and can be used in any way you see fit for your customization needs.

Last updated