-
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
Lots of extra markup in v2.6 #6089
Comments
Can you elaborate on the problem that these divs are causing? Aside: Looking briefly, most are from event normalization (e.g. focus outside detection). There's some hope that the need for element wrappers can be avoided in the future with enhancements to React's new
|
Also, these are internal to the editor and not part of the content. |
It's causing issues for styling more complex blocks. Specifically those with multiple elements that aren't laid out vertically-- e.g., a recent post with a thumbnail on the left and text content to the right. |
/cc @brandonpayton. I think this is caused by the fact that we apply |
Those divs are indeed due to
@gziolo and I were not pleased with these additions but did not see a better solution at the time. I'm hoping that React will eventually support specifying event listeners on Fragments as mentioned in the React 16.2 fragment support post:
|
Does this mean that the divs are here to stay until there are updates to React? If so, can we add a class or wrapper so we can target these divs without having to use nth-child selectors in CSS? |
We will take a closer look if we can limit the number of divs that are there before Gutenberg gets merge into WordPress core. 👍 |
Related #6839 |
#7477 removed some unneeded wrapping |
Closing this as there's been some changes on the HoC wrappers. If there's anything specific still causing issues, please, open new issues. |
Issue Overview
The 2.6 release adds a lot of wrapping divs and internal divs to various components in a block.
Steps to reproduce
Images
https://imgur.com/a/IkCWz
The text was updated successfully, but these errors were encountered: