CSSRoot to Liquid is a powerful command-line tool that converts CSS variables to Shopify Liquid section settings. With this utility, you can easily make your CSS styles customizable through the Shopify Theme Editor.
This tool is designed to save time and effort for developers who work with Shopify themes, allowing them to focus on other important aspects of the project.
- Automatically generates Shopify Liquid section settings based on CSS variables
- Supports color and text type settings
- Handles nested CSS variables and inherit values
- Converts RGB values to HEX format for color settings
To install the tool, you need to have Node.js installed on your computer. Once Node.js is installed, you can easily install CSSRoot to Liquid from npmjs using the following command:
npm i cssroot-2-liquid -g
- Place your CSS file with variables in the project directory.
- Open a terminal/command prompt and navigate to the project directory.
- Run the following command:
cssroot-2-liquid your-file-name.css
- The tool will generate a new
.liquid
file in the same directory with the corresponding section settings. For a visual demonstration, please refer to these videos:
![How to Use cssroot-2-liquid]
![How to Use cssroot-2-liquid with Shopify]
We are constantly working to improve CSSRoot to Liquid and expand its capabilities. Some of the features and optimizations we plan to add in future releases include:
- Support for more setting types, such as images, selectors, and range sliders.
- A graphical user interface (GUI) to facilitate easier interaction with the tool.
- Integration with popular code editors like Visual Studio Code and Atom, as well as Shopify CLI.
- The ability to generate Liquid code snippets for individual CSS variables, instead of generating an entire section file.
- Improved error handling and reporting to provide more informative messages and suggestions.
- Performance optimizations to ensure faster and more efficient code generation.
Your feedback and suggestions are always welcome, as they help us to enhance the tool and make it more useful for the developer community.