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

Question about margin-block-start #156

Open
aksld opened this issue Apr 30, 2024 · 1 comment
Open

Question about margin-block-start #156

aksld opened this issue Apr 30, 2024 · 1 comment

Comments

@aksld
Copy link

aksld commented Apr 30, 2024

Hello,

I'm just starting out with Ollie.

I just want to modify my header.
I've added a block cover.
And above it a navigation block.

On the editor, I have a space above the navigation block. But not at the front.

The CSS rule applied is :

where(.wp-site-blocks) > * {
    margin-block-start: var(--wp--preset--spacing--medium);
}

Basically I can't adjust the margin of the navigation block. However, if I put a group block with a margin of 0 it's fine.

Is this the solution?
Is it normal to have this upper margin applied by default on the editor and not on the front?

Thanks for your help :)

@mikemcalister
Copy link
Collaborator

Hey there,

Apologies for the late response!

I don't think this is an Ollie specific thing, this is more how the block spacing works in WP now. All blocks have a margin-block-start styling applied to give the page a vertical rhythm.

When you are designing with patterns or sections, generally you remove the top margin so those sections sit together nicely.

I can't see your specific situation, but what I would do is maybe group it together as you suggest. If I could see the full layout I could provide some more context. You may have this sorted out by now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants