Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try compensating nested blocks for block padding (#6408)
* Try compensating nested blocks for block padding As we make more and more blocks support nested blocks, we need to think about a way for nested blocks to compensate for their block padding. That's the 14px that surrounds the block itself, and on which the 1px selected-block border is painted. If we don't, any block that goes from non-nested blocks to nested blocks will suddenly have an extra 14px amount of padding inside. This PR is an experiment to fix that, and adds compensation before and after any nested context. What's missing here is a fix for collapsing margins — otherwise the negative top and bottom margins will apply to the _parent_, not the nesting context. The way to fix this is to apply a padding to any context in which childrens margins should not collapse into the parent. This PR adds that to the blockquote block itself, but if we think the general approach in this PR has merit, then we should find a way to make this more generic. For example a block that has nested children, if it had a `has-children` classname, then we could simply add the padding to that. * Fix regression in columns. * Remove Quote specific styles.
- Loading branch information