-
Notifications
You must be signed in to change notification settings - Fork 49.4k
Description
In #5714, we changed SVG attribute logic to pass all SVG attributes unchanged.
This means, for example, that instead of <svg strokeWidth>
you’d write <svg stroke-width>
.
The reason for this change was that we don’t want to maintain a whitelist of attributes.
Since we released 15 RC, I saw a report on Twitter saying that <svg className>
now also prints a warning:
Warning: SVG property
className
is deprecated. Use the original attribute nameclass
for SVG tags instead.
In a way, this makes sense, as it is consistent with us not maintaining a whitelist, and with how we treat custom components.
On the other hand, SVG elements do not seem that special, and asking people to use class
on them instead invites the old discussion about doing that for DOM elements as well.
I would like to double-check that this className => class
is indeed a change we want to make for SVG elements. Alternatively, we can leave className
as is by introducing a special case for it alone.