-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
FormToggle styling mis-alignment #13901
Comments
Hi @roykho thank you for reporting this issue 👍 I checked that on the toggles rendered by block editor core (latest posts, paragraph drop cap, archives block) the unalignment problem is not happening. Thank you in advance! |
Hi @jorgefilipecosta so the item I am working on requires some dependencies such as WooCommerce and WooCommerce Bookings however I've checked and I don't believe anything from those are causing the styling issue. Since opening this, I have then learned to use Here is a reference of both form inputs together so you can see the misalignment between the two. As you can see using I hope that helps. |
Hi @roykho, I tested the FormToggle inside a BaseControl, and outside one and in both cases the component aligned correctly. By default, FormToggle does not create labels, in the screenshots provided labels exist, could you provide more information regarding the code you are using with this component? E.g.: the wrapping components, and how the label is being set. In my tests, if we use top: $toggle-border-width; the component starts rendering incorrectly: Thank you for the help debugging this problem. |
Hi @jorgefilipecosta so the label you see in my first screenshot I added myself since FormToggle doesn't supply a label. But that is not related to the misalignment. You can see in my last screenshot, I added FormToggle without the "self" added label and it is still misaligned. I am not sure if this makes a difference but in my test FormToggle is wrapped inside If you're still unable to replicate, then I am ok to just close this out and re-open if we get more issues about that and thanks for your help! |
I'm unable to reproduce this as well, so I'm going to close for now. If it needs to be opened for any reason, feel free to comment below! Thank you! |
Describe the bug
The form control is mis-aligned by 2 pixels. See screenshots.
Proposed solution
Screenshots
Before the fix.
After applying the fix.
The text was updated successfully, but these errors were encountered: