![]() ![]() Online configurator & project kickstarter ![]() The complete configuration documentation including all options can be found here. So even if you don't enable plain CSS output explicitly, please make sure to set st to where your final CSS file is intended to be. svg-sprite then simply assumes that the CSS file will be created where the defaults would put it, which is again st / "sprite.css". The same holds true when you don't enable CSS output at all.If you just enabled CSS output by setting to true, the default value applies, which is st / "sprite.css".If you truly configured CSS output in addition to the pre-processor format, svg-sprite uses your custom as the CSS stylesheet location.svg-sprite doesn't know anything about your pre-processor workflow, so it might have to estimate the location of the CSS file: In this case, calculating the correct relative SVG sprite path as used by the stylesheets can become tricky, as your (future) plain CSS compilation doesn't necessarily lie side by side with the pre-processor file. ![]() Special care needs to be taken when you create a CSS sprite («css» or «view» mode) along with a stylesheet in one of the pre-processor formats (Sass, LESS, Stylus, etc.). Pre-processor formats and the sprite location the path of an SVG sprite as used by a CSS stylesheet). This is especially important for relative file paths (e.g. svg-sprite uses vinyl file objects to pass along virtual resources and to specify where they are intended to be located. "Oh wait! Didn't you say that svg-sprite doesn't access the file system? So why do you need output directories at all?" - Well, good point. Destination option Default Commentīy default, stylesheet resources are generated directly into the respective mode's base directory. Relative destination paths refer to their ancestors as shown in the following scheme, with the current working directory being the ultimate base. Several configuration options are controlling the exact location of each file, and you are well advised to spend a moment understanding how they interrelate with each other. compile ( ( error, result ) => Output destinationsĭepending on your particular configuration, svg-sprite creates a lot of files that partly refer to each other. readFileSync ( 'assets/svg-1.svg', 'utf-8' ) ) spriter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |