---
title: "Comment by Tarun Sharma on \"Why SVG Icons Render at the Wrong Size: viewBox, width/height, and CSS\" | Hashnode"
description: "The {...props} order bug is the one I've seen bite teams the most, especially once a design system wraps every icon in its own component and nobody remembers to"
url: "https://hashnode.com/posts/svg-viewbox-vs-width-height-css/6a7a54e6b268deffb3e881b4/comment/6a8408abad1bb772c084b262"
---

[Discussion](https://hashnode.com/posts/svg-viewbox-vs-width-height-css/6a7a54e6b268deffb3e881b4)

Comment [Why SVG Icons Render at the Wrong Size: viewBox, width/height, and CSS](https://hashnode.com/posts/svg-viewbox-vs-width-height-css/6a7a54e6b268deffb3e881b4)

[Tarun Sharma](https://hashnode.com/@101beardo)

[Aug 18](https://hashnode.com/posts/svg-viewbox-vs-width-height-css/6a7a54e6b268deffb3e881b4/comment/6a8408abad1bb772c084b262)

The {...props} order bug is the one I've seen bite teams the most, especially once a design system wraps every icon in its own component and nobody remembers to check spread order six months later. I'd add one more trap to your edge case list: a global .icon { width: 24px !important } left over from an old reset will beat both the size prop and correct spread order, and it looks exactly like a broken component so people go debugging JSX for an hour before checking the stylesheet. Worth grepping for !important on icon classes before blaming the component.

[Roman Riaboshtan](https://hashnode.com/@roman-riaboshtan)

[Aug 18](https://hashnode.com/posts/svg-viewbox-vs-width-height-css/6a7a54e6b268deffb3e881b4/comment/6a8408abad1bb772c084b262#reply-6a840a2fb7d0461a0ee9249d)

Thanks for reading and for the great tip! I’ll definitely look into adding this edge case to the article. Also, really appreciate you sharing that real-world issue from your project — awesome feedback!

[Tarun Sharma](https://hashnode.com/@101beardo)

[Aug 18](https://hashnode.com/posts/svg-viewbox-vs-width-height-css/6a7a54e6b268deffb3e881b4/comment/6a8408abad1bb772c084b262#reply-6a84342c0b6468e4b90c9e0a)

Glad it's useful. That !important trap is easy to miss since the symptom looks exactly like a broken component, not a stylesheet issue, so it's worth calling out explicitly.
