Style element
See original GitHub issueQuestion
I’m using this smooth-code svg to jsx converter to render my svg components. My designer co-worker is sending me the svg files with the style element, it looks like this:
<style>.a{fill:none;}.b{clip-path:url(#a);}.c{clip-path:url(#b);}.d{fill:#fff;}.e{fill:#f8cd2d;}.f{fill:#e2222c;}.g{fill:#14673b;}.h{clip-path:url(#c);}</style>
smooth-code converts them but with this message:
/* SVGR has dropped some elements not supported by react-native-svg: style */
And because of that, the svg is fully black when rendered… I dont know what to say to my co-worker to fix this at his end (He uses Adobe XD), so the workaround I found is to manually add the fill
prop with the needed color…
Is there a better solution?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10
Top Results From Across the Web
The Style Information element - HTML - MDN Web Docs
The <style> HTML element contains style information for a document, or part of a document. It contains CSS, which is applied to the...
Read more >HTML style tag - W3Schools
The <style> tag is used to define style information (CSS) for a document. Inside the <style> element you specify how HTML elements should...
Read more >4.2.6 The style element — HTML5: Edition for Web Authors
The style element allows authors to embed style information in their documents. The style element is one of several inputs to the styling...
Read more >The HTML <style> Element - Educative.io
The HTML <style> element is used to style an HTML document or part of a document without the need for an external stylesheet....
Read more >HTML style attribute - GeeksforGeeks
Inline Style: In Inline styling, the CSS rules are directly written inside the starting tag using the style attribute. The style attribute ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is support for the style element in SvgCss nowadays
@myitelekt those are dynamic xmls that I receive from the backend. the solution was using SvgCss,