Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in relative measures in height #833

Open
XMICT opened this issue Oct 30, 2024 · 1 comment
Open

Bug in relative measures in height #833

XMICT opened this issue Oct 30, 2024 · 1 comment

Comments

@XMICT
Copy link

XMICT commented Oct 30, 2024

Overview of the problem

I'm using re-resizable version 6.10.0

My browser is: Chromium

Description

The ‘Resizable’ component has a bug when providing the height with relative values, specifically with percentage (x%). The component refuses to change the height

Code Sandbox

https://codesandbox.io/p/sandbox/ecstatic-clarke-p27rpf

@stokesman
Copy link

I'm not a contributor but these are my thoughts:

Even in the context of static HTML/CSS, if the DOM parent has no height then percentage units don’t work. That’s to say, I don’t see how this can be expected to work automatically. ResizableBox shouldn’t just set an arbitrary height on the parent element when its height is specified as percentage.

This limitation could be mentioned in the docs and/or the library could output a console warning (in development) that the parent has no height so % units can’t work.

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

No branches or pull requests

2 participants