# Anomaly with SVG Component

**URL:** <https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508>\
**Category:** Elements\
**Created:** [May 10, 2025, 8:11pm UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508 "2025-05-10T20:11:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [May 10, 2025, 8:11pm UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/1 "2025-05-10T20:11:45Z")

</div>

@dan I just ran into an issue I have never encountered before.

I created an SVG, which is placed inside a container. See below.

 ![CleanShot 2025-05-10 at 09.58.03@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/7/3/73d06ae357123792d6eb0fcceb43e4a8d18f7ca9.png)

This SVG is set to have a WIDTH of 12, as shown here.

 ![CleanShot 2025-05-10 at 09.58.23@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/d/a/dac6756176983821deaabcfc8a85e417c3eba739.png)

But if you look at the SVG in the first screenshot you will see that when selected it is the full width of the content of the container. In this example, I have a transform on the SVG that rotates it 90º. But due to the width being incorrect it rotates using that width.

To correct the problem, I set the left margin on the SVG to 0 and the right one to AUTO, then it displays the correct size when selected. See below.

 ![CleanShot 2025-05-10 at 09.58.58@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/f/7/f7216f09e9dd71a0f90c47726a774dd658bb9959.png)

Now if I perform the transform it does the right thing and rotates in place.

My questions is, why is this happening, is there something I’m doing wrong or some setting I missing on the SVG? I would have thought if I set a hard coded width for a component it would resize to that width. I’ve studied the settings in the container but I don’t see anything that would be forcing the full width on the SVG.

Is this a bug?

---

<div class="post-metadata">

**Author:** ![pumpkin](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@pumpkin](https://forums.realmacsoftware.com/u/pumpkin)\
**Post date:** [May 10, 2025, 9:57pm UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/2 "2025-05-10T21:57:50Z")

</div>

Hm, I do have the same setup in a project here. It behaves normal as it should. Did you change the container settings?

Edit: just tried out with a blank container and an svg added into it. It’s not taking up the full width. Did you remove the size attributes in the svg settings (which is really neat way to tidy up that svg code btw. Thanks Realmac 😉 )

 ![Screenshot 2025-05-10 at 23.59.40](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/b/8/b8b6b8ffbb4a4e71f3482368e288d9e32ccaccb4.png)

---

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [May 11, 2025, 12:43am UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/3 "2025-05-11T00:43:19Z")

</div>

Yes, I did have [Elements](https://elementsapp.io/) remove all of the info from the SVG.

I just created a new project added a single container and then added an SVG inside the container. I touched none of the container settings other than to add some spacing around the content area. The SVG was automatically set to a width of 20 by [Elements](https://elementsapp.io/), but when it is selected you can see it extends the full width of the container content.

I did not set any other settings for the SVG.

 ![CleanShot 2025-05-10 at 14.38.03@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/7/c/7c421d1cd8316fc4ea7e960ca43ce0585ada5d71.png)

It is worth noting that the size of the actual SVG image is correct, it just the selection size that is incorrect. So if I was now to perform a center rotation transform on the SVG it would rotate out of view as it would be using the center of the width of the container content.

---

<div class="post-metadata">

**Author:** ![pumpkin](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@pumpkin](https://forums.realmacsoftware.com/u/pumpkin)\
**Post date:** [May 11, 2025, 7:31pm UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/4 "2025-05-11T19:31:53Z")

</div>

Weird. That never happened to me (yet).

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [May 12, 2025, 7:49am UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/5 "2025-05-12T07:49:58Z")

</div>

> [@handshaper](#):
>
> It is worth noting that the size of the actual SVG image is correct, it just the selection size that is incorrect.

Good catch — that is a little bug that’s slipped through.

I’ve fixed it, and it’ll get included in the next beta 🙂

---

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [May 12, 2025, 6:24pm UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/6 "2025-05-12T18:24:24Z")

</div>

@ben Awesome. I was beginning to wonder if I was imagining things, as no one else seems to have run into this glitch.

---

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [May 12, 2025, 9:08pm UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/7 "2025-05-12T21:08:41Z")

</div>

> [@ben](#):
>
> I’ve fixed it, and it’ll get included in the next beta 🙂

@ben Did this make it into the 0.8.3 build as I’m still seeing the problem?

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [May 12, 2025, 9:32pm UTC](https://forums.realmacsoftware.com/t/anomaly-with-svg-component/47508/8 "2025-05-12T21:32:26Z")

</div>

It’s in 0.8.4 😉
