D
D
deemaagog2018-02-07 18:50:30
webpack
deemaagog, 2018-02-07 18:50:30

Webpack, cra, how to import styles for svg from external css file?

hello
I am using create-react-app. The project has a lot of svg files, styles are set like this:

<svg enable-background="new 0 0 28.539 29.123" height="29.123px" id="Capa_1" version="1.1" viewBox="0 0 28.539 29.123" width="28.539px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>
.myfill { fill:red } 
</style>
<g><path class = "myfill" d="M7.63 и т. д.

Is it possible to somehow import a css file so as not to prescribe styles for each svg? The svgs themselves are used as url data: background-Image: url(./images/play.svg)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question