SVG attributes format
See original GitHub issueNot sure if this an issue or a clarification.
If I have some SVG, such as
<path d="M 2 50 A 48 48 0 0 1 50 2" stroke="#gradLeft-1" strokeWidth="4" fill="none" />
It doesn’t work correctly.
If I change ‘strokeWidth’ to ‘stroke-width’ (changed to lower case with a dash) then it does work ok.
This is different to react.
Is this behaviour correct? or have I done something wrong?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
SVG Attribute reference - SVG: Scalable Vector Graphics | MDN
Below is a list of all of the attributes available in SVG along with links to reference documentation to help you learn which...
Read more >Document Structure — SVG 2
The 'refX' and 'refY' attributes define the reference point of the symbol which is to be placed exactly at the symbol's x,y positioning...
Read more >SVG Tutorial - W3Schools
SVG defines vector-based graphics in XML format. ... SVG defines the graphics in XML format; Every element and every attribute in SVG files...
Read more >SVG Elements and Attributes - O'Reilly Design System
Format is a list of property-name: property-value; pairs. The final ; in a list is optional. Whitespace is optional before and after property...
Read more >SVG Properties and CSS
SVG CSS Properties · Text properties · Clip properties · Masking properties · Filter effects · Gradient properties · Interactivity properties · Color ......
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 Free
Top 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
react-dom
has a filepossibleStandardNames.js
that can be used to normalize attributes:https://github.com/facebook/react/blob/ca106a02d1648f4f0048b07c6b88f69aac175d3c/packages/react-dom/src/shared/possibleStandardNames.js
cc @developit
Great - good to know I wasn’t being stupid!