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 different title/appender margin fix. #10134

merged 1 commit into from Sep 25, 2018


None yet
2 participants

jasmussen commented Sep 24, 2018

This PR hopes to address feedback in #9782 (comment).

The Title is not a block. It's a textarea, and has different metrics and margins that the actual text blocks. But visually and to ensure simplicity, we style it to look like a block, and have the right margins.

Right now in master, we do this by applying first-child margins, to any item that comes after the title. This can bleed into nesting contexts, which is not ideal.

This PR removes that, and applies the same margin to the default block appender that text blocks has. It then provides a negative margin to the title block itself, so that "pulls upwards" any first block below it.

Screenshots showing the margin in this PR:

screen shot 2018-09-24 at 11 13 30

Compare to text:

screen shot 2018-09-24 at 11 13 38

To test, please verify there are no margin-related issues with any content, notably content inside nested block contexts like the Columns block.

@jasmussen jasmussen added this to the 4.0 milestone Sep 24, 2018

@jasmussen jasmussen self-assigned this Sep 24, 2018

@jasmussen jasmussen requested a review from WordPress/gutenberg-core Sep 24, 2018


Looks good in my tests I did not manage to find any regression 👍

@jasmussen jasmussen merged commit 0571b41 into master Sep 25, 2018

2 checks passed

codecov/project 48.81% remains the same compared to fd9bfa5
continuous-integration/travis-ci/pr The Travis CI build passed

@jasmussen jasmussen deleted the try/appender-fix branch Sep 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment