Results 18 comments of Simão

As agreed with @imchell, I will add some test cases to his PR.

@TroyTae is this change related to React 18.0.0? Just out of curiosity.

Hey 👋. The padding is applied by the container. What happens is that in the first use case you have a `Row` and a `Col`. -`Row`: Applied Margin left. -`Col`:...

@SalahAdDin, its looks like your codesandbox is having an issue. Could you give it a look?

@jrgarciadev, have you ever considered encapsulating the logic for the label and helperText in a external component, such as `TextField` or `FormField`. In that component, you could gather a nit...

So, if you inspect the container that is applying the margin, it looks like this: ![image](https://user-images.githubusercontent.com/43269067/175552796-3c3c8698-862b-441e-b5a6-e98b79171b99.png) If you inspect the parent container, you will see that it doesn't not take...

Found this: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing#see_also So if you put any other child as the first child of the container, you wont have that issue. I wonder if the `getRect` should have this...

Exactly @imchell, but the offset is odd it self. If you place a `h1` for example as the first child, there won't be an offset. This is how reachUI calculates...

I was only able to find a library that handled this edge case: [React Spectrum](https://react-spectrum.adobe.com/react-aria/useDialog.html). I don't know if @jrgarciadev would allow a refactor of the component to use `useDialog`...