diff --git a/README.md b/README.md index 1d93d04..d4de313 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,9 @@ Besides this Node.js module there are several different versions of *iconizr*: Release History --------------- +#### v0.2.1 +* Fixed invalid `background-position` style in Sass / LESS templates ([#4](https://github.com/jkphl/node-iconizr/issues/4)) + #### v0.2.0 * Switched to mustache.js for extended function support * Fixed full disabling of output rendering ([#2](https://github.com/jkphl/node-iconizr/issues/2)) diff --git a/package.json b/package.json index e508e81..2cdc5ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iconizr", - "version": "0.2.0", + "version": "0.2.1", "author": { "name": "Joschi Kuphal", "email": "joschi@kuphal.net", diff --git a/tmpl/sprite.html b/tmpl/sprite.html deleted file mode 100644 index f79bd6e..0000000 --- a/tmpl/sprite.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - SVG sprite preview | svg-sprite - - - - - - - - - - -{{> inline}} - - -
-

SVG sprite preview

-

This preview features two methods of using the generated sprite in conjunction with inline SVG. Please have a look at the HTML source for further details and be aware of the following constraints:

- -
-
- - -

A) Inline SVG with embedded sprite

- - - - -

B) Inline SVG with external sprite (IE 9-11 with polyfill only)

- - -
- - - diff --git a/tmpl/sprite.html b/tmpl/sprite.html new file mode 120000 index 0000000..b35fbb7 --- /dev/null +++ b/tmpl/sprite.html @@ -0,0 +1 @@ +../../svg-sprite/tmpl/sprite.html \ No newline at end of file diff --git a/tmpl/sprite.inline.svg b/tmpl/sprite.inline.svg deleted file mode 100644 index 022b3ea..0000000 --- a/tmpl/sprite.inline.svg +++ /dev/null @@ -1,4 +0,0 @@ - - -{{#svg}} {{{data}}}{{/svg}} - \ No newline at end of file diff --git a/tmpl/sprite.inline.svg b/tmpl/sprite.inline.svg new file mode 120000 index 0000000..7958b7f --- /dev/null +++ b/tmpl/sprite.inline.svg @@ -0,0 +1 @@ +../../svg-sprite/tmpl/sprite.inline.svg \ No newline at end of file diff --git a/tmpl/sprite.less b/tmpl/sprite.less index f0a75a3..a663ced 100644 --- a/tmpl/sprite.less +++ b/tmpl/sprite.less @@ -1,11 +1,11 @@ .{{prefix}}{{^common}}(){{/common}} { - background-repeat: no-repeat;{{#common}} + background-repeat: no-repeat;{{#common}} background-image: url({{{sprite}}});{{/common}} } {{#svg}}{{#selector}}.{{expression}}{{^last}}, -{{/last}}{{/selector}} { - background-position: {{position}};{{^common}} +{{/last}}{{/selector}} { {{#sprite}} + background-position: {{position}};{{/sprite}}{{^common}} .{{prefix}}(); background-image: url({{#sprite}}{{{sprite}}}{{/sprite}}{{^sprite}}{{#encode}}"{{{encoded}}}"{{/encode}}{{^encode}}{{{path}}}{{/encode}}{{/sprite}});{{/common}} }{{#dims}}{{#dimensions}} diff --git a/tmpl/sprite.scss b/tmpl/sprite.scss index dafb956..fee206c 100644 --- a/tmpl/sprite.scss +++ b/tmpl/sprite.scss @@ -4,8 +4,8 @@ } {{#svg}}{{#selector}}.{{expression}}{{^last}}, -{{/last}}{{/selector}} { - background-position: {{position}};{{^common}} +{{/last}}{{/selector}} { {{#sprite}} + background-position: {{position}};{{/sprite}}{{^common}} @extend %{{prefix}}; background-image: url({{#sprite}}{{{sprite}}}{{/sprite}}{{^sprite}}{{#encode}}"{{{encoded}}}"{{/encode}}{{^encode}}{{{path}}}{{/encode}}{{/sprite}});{{/common}} }{{#dims}}{{#dimensions}}