Skip to content

Styling blocks specific to the page content area #48319

Answered by tomdevisser
johnhooks asked this question in Q&A
Discussion options

You must be logged in to vote

@johnhooks

This sounds like something that can be solved by adding just a single spacer in the template for the single. Another approach can be selecting the first block with the nth-child selector in CSS. For a more global approach on handling block spacing, check this blogpost by 10up.

Edit: one more additional method would be to add a custom class to every block you want to give additional spacing, and adding some custom global styles for that class.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tomdevisser
Comment options

You must be logged in to vote
1 reply
@tomdevisser
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants