Add in xlink to the namespace to allow a more reliable icon-sprite.sv…#2116
Open
Bobspadger wants to merge 1 commit intobigcommerce:masterfrom
Open
Add in xlink to the namespace to allow a more reliable icon-sprite.sv…#2116Bobspadger wants to merge 1 commit intobigcommerce:masterfrom
Bobspadger wants to merge 1 commit intobigcommerce:masterfrom
Conversation
|
Autotagging @bigcommerce/themes-team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Update the
grunt/svgstore.jsfile to add in thexlinknamespace to provide a more reliable build.Currently some svg files will cause the created single
icon-sprite.svgfile to stop working when referenced in the templates via<svg><use xlink:href="#icon-GiftCertTest" /></svg>method.Requirements
Tickets / Documentation
Relevant conversation here where users are mentioning to removing various elements of the source svg files to get it to work - however, adding this into the build allows a much greater range of svg files to be used.
#1246
Screenshots (if appropriate)
Screenshot of a broken

icon-sprite.svgafter adding an additonal svg fileTo replicate a failed build.
assets/iconsdirectory and run thegrunt svgstorecommand with the default configuration.icon-sprite.svgwill be created, but if you view it in MacOS finder you will see the error message (as per above screenshot)svgchevrons in the menu etc are now no longer visible.icon-xxxof the svg below and note it is not loaded.grunt/svgstore.jsfile with the adjusted, and rungrunt svgstoreagain. All should be ok!Credit:
Please note I did not create this file - it is from Giao at Papathemes and all credit should go there!