bobbingwide / thisis

ThisIs ... experimental Full Site Editing theme
GNU General Public License v3.0
1 stars 0 forks source link

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

Open bobbingwide opened 3 years ago

bobbingwide commented 3 years ago

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

bobbingwide commented 3 years ago

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 commented 3 years ago

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

bobbingwide commented 3 years ago

Apparently you can use experimental-theme.json to set padding to 0. I've asked how to do this in https://github.com/WordPress/gutenberg/issues/30545#issuecomment-831380065

bobbingwide commented 3 years ago

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?