How to set up your project and use the Sfumato CLI tool.
Sfumato works by reading a source CSS file and generating an output CSS file which is what your project should actually use. Typically the source file is named source.css but can be any valid CSS file name.
The source CSS file contains:
Sfumato can create a sample file for you. Navigate to the folder where you want the file created, and run the init command:
This will create a reference file named sfumato-example.css with all the configuration options and examples for custom colors, variants, etc. You should rename the file to something more appropriate, like `source.css` and make changes to suit your project.
PRO TIP: Settings not marked "REQUIRED" should be deleted if you're not changing their values. Settings marked "EXAMPLE" are just examples that should also be deleted.
PRO TIP: Only configure project paths with files that will use Sfumato classes, like folders with HTML files, JavaScript files that will change element classes, etc. Use the exclusion options when appropriate. Don't scan folders unnecessarily!
Once you have a source file established, you can try using the tool to watch project files for changes and build the output CSS file!
The syntax for running the Sfumato CLI tool is:
The commands are:
You can append additional css file paths and minify flags to have Sfumato watch and build all of them.