Hi,
Thank you for your great library!
I'm using it in a project where I need to support dynamic resizing for multiple elements in a single row. These elements share a common parent with width: 100%, and their combined width should always remain 100%.
For example, if I have two elements with widths of 40 and 60, and I resize the first element to 30, I want the second element to automatically expand to 70 — keeping the total width at 100.
To achieve this, my approach is:
When resizing an element, I want the adjacent element (either the next or previous one, depending on which side is being dragged) to take up the remaining space.
For a smoother experience, I use CSS to apply flex-grow: 1 and flex-shrink: 1 to the adjacent element.
However, I noticed the library sets flex-shrink: 0 by default, which prevents the adjacent element from resizing properly. I can override this with !important, but I wanted to ask:
Is there a specific reason flex-shrink: 0 is enforced? Would modifying it to allow shrinking/growing cause any issues or break core functionality?
Thanks so much in advance!
Hi,
Thank you for your great library!
I'm using it in a project where I need to support dynamic resizing for multiple elements in a single row. These elements share a common parent with
width: 100%, and their combined width should always remain 100%.For example, if I have two elements with widths of 40 and 60, and I resize the first element to 30, I want the second element to automatically expand to 70 — keeping the total width at 100.
To achieve this, my approach is:
When resizing an element, I want the adjacent element (either the next or previous one, depending on which side is being dragged) to take up the remaining space.
For a smoother experience, I use CSS to apply
flex-grow: 1andflex-shrink: 1to the adjacent element.However, I noticed the library sets
flex-shrink: 0by default, which prevents the adjacent element from resizing properly. I can override this with!important, but I wanted to ask:Is there a specific reason
flex-shrink: 0is enforced? Would modifying it to allow shrinking/growing cause any issues or break core functionality?Thanks so much in advance!