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

Eliminate white gap between black header and blue site title #6

Open
bobbingwide opened this issue Apr 25, 2021 · 4 comments
Open

Eliminate white gap between black header and blue site title #6

bobbingwide opened this issue Apr 25, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Apr 25, 2021

There's some white space between the header template part and the next block which is the site title.
This is partly due to the unwanted paragraphs in the inline CSS for the header.
There's already a fix but it's not in Gutenberg 10.4.1

I tried Gutenberg Nightly but that had its own problems.

Workaround

  • Copy/cobble the override logic from fizzie and/or sb.
  • Add some CSS overrides in style.css
@bobbingwide bobbingwide added the bug Something isn't working label Apr 25, 2021
@bobbingwide bobbingwide self-assigned this Apr 25, 2021
@bobbingwide
Copy link
Owner Author

bobbingwide commented Apr 25, 2021

In addition to resolving the unwanted paragraphs added by wpautop()
it's also necessary to override some styling.

/**
Override top and bottom margins on h1 - user agent stylesheet
 */
h1 { margin-block-start: 0px; margin-block-end: 0px;}

also

/**
Override margin bottom added by Gutenberg inline styling
 */
.wp-block-columns { margin-bottom: 0px;}

@bobbingwide
Copy link
Owner Author

Reducing the bottom margin on columns resolved the problem that the header was too deep.

@bobbingwide
Copy link
Owner Author

Apparently you can use experimental-theme.json to set padding to 0.
I've asked how to do this in WordPress/gutenberg#30545 (comment)

@bobbingwide
Copy link
Owner Author

The template-part logic produces a Notice when a template part has been added to content but not actually selected.
The SSR tries to produce the message 'Template part has been deleted or is unavailable: %s'
But $attribute['slug'] is not set so the message is produced.
What should the code do? Be silent or produce a message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant