Skip to content

fix: prevent parent expansion by skipping width/height setting to 100% on absolute SVG#2752

Merged
jakex7 merged 1 commit intosoftware-mansion:mainfrom
kacperzolkiewski:absolutelyFilledSvg
Aug 26, 2025
Merged

fix: prevent parent expansion by skipping width/height setting to 100% on absolute SVG#2752
jakex7 merged 1 commit intosoftware-mansion:mainfrom
kacperzolkiewski:absolutelyFilledSvg

Conversation

@kacperzolkiewski
Copy link
Collaborator

Summary

This PR fixes issue: #2689
In the SVG component when we do not pass width and height props, we set them to 100%. This caused problems when position is set to absolute because the SVG would expand beyond its parent. I added an extra check to only set width/height to 100% if position !== 'absolute'.

Test Plan

Run the example from issue: #2689 and check if Views are filled properly

Compatibility

OS Implemented
iOS
MacOS
Android
Web

Checklist

  • I have tested this on a device and a simulator

Copy link
Member

@jakex7 jakex7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the title as we automatically generate the changelog from it

@kacperzolkiewski kacperzolkiewski changed the title fix: prevent parent expansion by skipping width/height setting to 100… fix: prevent parent expansion by skipping width/height setting to 100% on absolute SVG Aug 26, 2025
@jakex7 jakex7 merged commit 417b34e into software-mansion:main Aug 26, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants