Skip to content
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

Try compensating nested blocks for block padding #6408

Merged
merged 3 commits into from
Jun 11, 2018

Commits on Jun 11, 2018

  1. 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.
    jasmussen committed Jun 11, 2018
    Configuration menu
    Copy the full SHA
    1be4f5c View commit details
    Browse the repository at this point in the history
  2. Fix regression in columns.

    Joen Asmussen authored and jasmussen committed Jun 11, 2018
    Configuration menu
    Copy the full SHA
    55fca88 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d08b459 View commit details
    Browse the repository at this point in the history