-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Possibility to call spritesheet as param of "svg_spritesheet" #15
Comments
Indeed, having one or two (optionals) parameters for
Example: For now, I work with multiple spritesheets in the front-end workflow side, with gulp-svg-sprite), which covers my current use case. Maybe I’ll try to build something and PR for the version with one argument. I currently wait for @adamwathan ’s feedback of the one I made (as I’m noob to the Git contribution thing and not especially a PHP-guy). |
I agree, those parameters would be a good adition. As to filtering the icons as you propose in the third parameter, I think it would be even better being able to pass an array of spritesheets. It would be convenient to split icons, for example, social_icons_spritesheet.svg, form_labels_spritesheet.svg, etc. That way, we would not need to import a huge set of icons every time, but just render the ones we need, optimizing the amount of html rendered. Other than that, the package is great. I like the fact that the spritesheet can be a blade view, allowing for html sintax highlighting in code editors, as well as auto completion. It does not force us to use the .svg extension. |
Would totally look at a PR for this 👍🏻 I'm personally only ever using maybe a dozen icons on a site so I'm fine with including the whole spritesheet, but even so I use the inline option 99% of the time anyways. |
Going to close this for now as I don't personally have any intention on adding it, although I would still look at a PR if someone were to submit one. Part of me wants to remove spritesheet support entirely at some point, because I think directly inlining your SVGs is simpler with some benefits and not any real downsides. I probably won't but I will at least de-emphasize it in the docs. Seems to be becoming the recommended approach in other circles: |
That’s what I went for since a couple of weeks, too, after having discussed this specific point with a former colleague. Not sure a spritesheet couldn’t be a benefit for some projects, by the way (no examples come in mind right now). |
Hi. I usually have different layouts and different icon collections in my projects. Different landing pages use different icon sets.
The way blade-svg package works does not allow the usage of multiple svg spritesheets, so you would need to render icons you are not actually going to use in every page (maybe I am wrong).
I think it would be very convenient if we could pass the location of any sprite sheet from any view, being able to switch icon collections as desired. Sometimes you need a collection of only three icons, for example. It would be nice if we could create and render a spritesheet for only those three icons instead of a big set of svg's.
Thanks in advance.
The text was updated successfully, but these errors were encountered: