By default, when you export CSS associated with a sprite, it will overwrite any existing file. However, you can set it to update an existing file by specifying an overwrite mode.
|Overwrite||Any existing file is deleted and recreated (default)|
|Replace||Matching class names will be removed. The exported CSS will be inserted at the point where the first matching class was found. If no matches were found, the new CSS is appended to the end of the file|
|Append||Matching class names will be removed. The exported CSS will be appended to the end of the file|
When using either the Replace or Append options, Spriter will search for CSS selectors where the qualifier matches either the name of a selector in the project, or the name of a selector for the previous export. If a selector name has been modified, or another qualifier added, Spriter will not remove the block.
Spriter currently does not support detection and removal of CSS comments. This may cause duplicate comments to appear in CSS documents when using the Replace or Append options. You should modify the CSS templates to either remove the comments, or place the comments inline in the selector CSS.
Never use an option other than Overwrite for non-CSS based templates. Spriter is unable to parse custom formats and so will be unable to process replace or append modes.
Configuring CSS export mode
To configure the CSS export mode:
- Click the CSS settings tab
- Select a value from the list provided in the Export Options frame