This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # alda (10)
- # beginners (15)
- # boot (16)
- # business (2)
- # clojure (68)
- # clojure-czech (1)
- # clojure-italy (3)
- # clojure-japan (71)
- # clojure-russia (32)
- # clojure-uk (2)
- # clojurescript (134)
- # core-async (84)
- # datomic (27)
- # devcards (13)
- # hoplon (3)
- # ldnclj (8)
- # ldnproclodo (1)
- # lein-figwheel (2)
- # melbourne (1)
- # off-topic (29)
- # om (53)
- # re-frame (7)
- # reagent (15)
- # yada (50)
@pupeno You download a folder with the SVGs in them, and then you just link to those SVGs as images.
<img src=“path/to/svg” />
That’s not how they were used in the demo.html they shipped. That usage is not talking advantage of spriting. And I’m not sure with img instead of use there would be a difference, but it wasn’t immediately obvious to me how to control the size of the svg and still be responsive.
There are many ways to use SVGs You can use the SVGs in the same way that they do in demo.html. I personally don’t use it, because React.js doesn’t support it. With
img you can just normally set the height and width, as with any html element.
What do you mean when you say that it isn’t taking advantage of spriting? And what do you mean when you say you want to control the size and keeping it responsive?
Spriting is when you have one file contain all the images so they can be download in one HTTP request and then you display only one part (a sprite) of that file. Using img will download each svg separately (this is not true for svg, it’s true for all types of imgs).
I can put a font icon in a bootstrap navbar and I’ll now it’ll scale properly with the navbar. I don’t even know what the size of the navbar is. I don’t know how to achieve the same with SVGs.
To be clear: I don’t want to manage to get SVGs to appear on my screen. I can do that, that’s easy. What I want is a good workflow. For example, I know bootstrap and font awesome are being used by several thousands of apps and many developers are testing it against many different browser versions and platforms.
Making an SVG appear on my screen is not the same as making an SVG appear on every screen out there, which is what I care about.
Looking at how to use SVG, there are many ways and they all seem to have caveats that are not small.
Ah, now I understand what you mean. I’m sure you’ve done your google-fu, but just in case you missed it, have you checked this guide out? https://css-tricks.com/svg-sprites-use-better-icon-fonts/ In this article, the author details the use of
<use>, and a workaround for IE. This is the method I wanted to use way back, but couldn’t because React didn’t support
<use>. If you aren’t using React, maybe you could try it.
Yeah, I read that. That’s how I got to icomoon. The method described there seems to depend on grunt and when it describes icomoon it doesn’t specify much. And yes, I’m using react, what do you mean it doesn’t support use?
React has a list of tags and attributes that it supports: http://facebook.github.io/react/docs/tags-and-attributes.html
use is not here.
Regrettably, we still have yet to solve the SVG problem 😛 You’re welcome, @pupeno.
cool, nice to see you in here i used to use it and helped a little with the website.. thought i remembered your handle from the mailing list