machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Inline svg with emblem.js #153

Closed cjroebuck closed 9 years ago

cjroebuck commented 10 years ago

Hey,

Is there a way to tell emblem to drop down to regular HTML. I want to include some inline svg in an emblem template but don't want to have to reformat it each time, also I'm not even sure ember supports the svg tag at the moment. If there is a better way to do this, please let me know.

(PS I don't want to use the svg as an image, it needs to be inline for my requirements so that I can target specific elements using css.)

clekstro commented 10 years ago

:+1: In my case I'd like to use it as an image, tho.

ro-ka commented 10 years ago

Any updates on this?

svg, gand path are not allowed tags. So emblem throws an error (the broccoli module in ember-cli) because of this.

gunnar2k commented 9 years ago

+

drewcovi commented 9 years ago

++

gunnar2k commented 9 years ago

Solution seems to be to throw a % in front of things:

%svg %defs %path %g

CNDW commented 9 years ago

you should be able to just put the svg tag content after a pipe, I.E.

 | <svg>
    ...svg content
  </svg>

I know that handlebars and ember have not played nicely with SVG content, until recently. I'm not sure how things have changed since htmlbars, I'd be interested in looking into it once emblem compatibility with html bars is finished.