-
Notifications
You must be signed in to change notification settings - Fork 6
options.fragment
Eugene Lazutkin edited this page Jul 11, 2014
·
1 revision
Type: Boolean
Default value: true
options.fragment
sets the template processing mode:
- When it is
true
, we are in the fragment mode. A template will be instantiated for every individual image, and collected in a CSS file. - When it is
false
, we are in the sprite mode. A template will be instantiated once per sprite. In order to produce individual CSS classes for images, in should contain code to generate all necessary text.
While the sprite mode requires a template to be more involved, and to contain logic, it offers an ultimate control over generating a CSS, or LESS, or SASS, or Stylus, or any other type of text file, custom-tailored for our unique project.
If the sprite mode is specified, options.templateFile should be specified as well. Otherwise the setting is ignored, and a default template is used in the fragment mode.
See options.templateFile for more details, and examples.