Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix symbol sprite preview. #71

Closed
wants to merge 1 commit into from
Closed

Fix symbol sprite preview. #71

wants to merge 1 commit into from

Conversation

literatesnow
Copy link

The symbol sprite preview has invalid html and also doesn't currently use the css dimensions resulting in large images which are pushed outside their boxes.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 81.32% when pulling 855cc27 on literatesnow:fix-symbol-preview into 7013e00 on jkphl:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 81.32% when pulling 855cc27 on literatesnow:fix-symbol-preview into 7013e00 on jkphl:master.

@jkphl
Copy link
Collaborator

jkphl commented Apr 18, 2015

Hey @literatesnow,

while both your points are very valid — thanks for reporting! — your fix seems to include some glitches as well. Replacing {{#last}}{{#classname}}{{raw}}{{/classname}}{{/last}} with {{expression}}{{^last}}, {{/last}} doesn't seem correct. I'll fix this.

Cheers,
Joschi

@jkphl jkphl closed this Apr 18, 2015
@jkphl jkphl added the bug label Apr 18, 2015
jkphl added a commit that referenced this pull request Apr 18, 2015
@jkphl jkphl self-assigned this Apr 18, 2015
@literatesnow
Copy link
Author

@jkphl Thanks. For some reason in my preview the svg class name is still blank (<svg class="">) and the (quick) way to make it work was copy the lines in the template from where it outputs the CSS.

Here's my command line if it helps:

svg-sprite
--dest www/svg
--svg-dimattrs false
--symbol
--symbol-sprite "../../icons.svg"
--symbol-prefix "svg-%s"
--symbol-inline true
--symbol-example
--symbol-example-dest "preview.html"
--log debug
<file1> <file2> <file3> <...>

CSS output:

.svg-icon-logout-dims { width: 28.1px; height: 22.9px; }

HTML output around svg:

<li title="icon-logout">
  <div class="icon-box">
    <!-- icon-logout -->
    <svg class="">
      <use xlink:href="#icon-logout"></use>
    </svg>
  </div>
  <h2>icon-logout</h2>
</li>

jkphl added a commit that referenced this pull request Aug 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants