Answer the question
In order to leave comments, you need to log in
Which is better - svg sprite or pasting the code directly in css?
If only svg is supposed to be used, only for new browsers, do I need to create a sprite or can I put the svg code directly into css styles? What is better for performance and what pitfalls can there be?
My case is a third-party js plugin that adds its own markup, in which I, in turn, need to insert svg, with hover effects. In principle, the plugin provides any insertion option, directly in HTML is even more convenient. Plus, the usual icons on the page, it seems like a sprite is the most convenient here. If you combine both approaches, will it not be perceived as a mess in the code?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question