question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add display=none to main SVG sprite output

See original GitHub issue

Is there currently a way to automatically add display='none' to the svg sprite? Otherwise it needs to be added manually.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cascornelissencommented, Sep 25, 2018

I would probably wrap it in a div or something with a specific class and target that div as I’ve ran into issues with directly styling SVGs in older version of Internet Explorer myself.

0reactions
a-amcommented, Sep 25, 2018

You may be right. How do you commonly implement. Included it at the end of the document and then do.

svg:last-child {
 display: none;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Icon System with SVG Sprites - CSS-Tricks
After selecting all the fonts you want, click the SVG button on the bottom and you'll get that output, including a demo page...
Read more >
SVG icon changes when SVG sprite set to display:none
Use visibility:hidden instead of display:none and make the original SVG width="0" and height="0" so that it doesn't take up space.
Read more >
How to Create and Manage SVG Sprites - Webdesigner Depot
You will need a vector design program that can generate SVG code. For this, I'll make use of Sketch and export a few...
Read more >
SVG reusability & animation - Iamsteve
The main way I would do this is I created an SVG file to contain ... Using your SVG sprite in HTML is...
Read more >
An Overview of SVG Sprite Creation Techniques - 24 Ways
Just like bitmaps, we can create image sprites with SVG – they don't look or work exactly alike, but the basic concept is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found