IconView should preserve (some) attributes of the <svg> tag #12597
Labels
package:ui
squad:features
Issue to be handled by the Features team.
type:bug
This issue reports a buggy (incorrect) behavior.
Milestone
📝 Provide detailed reproduction steps (if any)
If you create an icon with
the
fill="none"
will be ignored becauseIconView
creates the<svg>
element from scratch. Instead, we should preserve these attributes because they affect rendering. Without this attribute the icon can look broken.✔️ Expected result
fill="none"
stays❌ Actual result
fill="none"
is gone❓ Possible solution
svg
element.The fix should land around https://github.com/ckeditor/ckeditor5/blob/8254ae2dc7e0cfb23d15dc040a2c94f32ac0d3c5/packages/ckeditor5-ui/src/icon/iconview.js#L98-L112.
we should copy all attributes except
width
,height
(handled by our viewbox),viewbox
(already copied),xmlns
(handled bycreateElementNS
).If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: