-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Component wrongly styled #8871
Comments
@mmtr I've submitted a pull request for this bug. I've been using the components outside of Gutenberg a lot lately and have run into this same issue. I tracked down the issue to a style being applied to all components within the
This computed value of this on the
The SVG icon with the applied classes of |
* FormToggle wrapper class needs inline-block styling. Necessary for proper positioning of elements within .components-form-toggle. * Elements within FormToggle component need to have border-box box-sizing. This styling occurs within the block-editor on the post edit screen but does not exist outside of it. Moving this box-sizing value to the component resolves #8871.
* FormToggle wrapper class needs inline-block styling. Necessary for proper positioning of elements within .components-form-toggle. * Elements within FormToggle component need to have border-box box-sizing. This styling occurs within the block-editor on the post edit screen but does not exist outside of it. Moving this box-sizing value to the component resolves #8871.
* FormToggle wrapper class needs inline-block styling. Necessary for proper positioning of elements within .components-form-toggle. * Elements within FormToggle component need to have border-box box-sizing. This styling occurs within the block-editor on the post edit screen but does not exist outside of it. Moving this box-sizing value to the component resolves #8871.
Describe the bug
When rendering a
FormToggle
component outside WordPress, it is displayed with wrong styles because of the lack of the WordPress core styles.To Reproduce
Expected behavior
It is styled like if the component is rendered inside WordPress.
Screenshots
Desktop:
Additional context
Issue found while working on #8338 and Automattic/wp-calypso#26367
The text was updated successfully, but these errors were encountered: