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

Unable to set margin on headers using theme.json #33795

Closed
karmatosed opened this issue Jul 31, 2021 · 2 comments
Closed

Unable to set margin on headers using theme.json #33795

karmatosed opened this issue Jul 31, 2021 · 2 comments
Labels
[Block] Heading Affects the Headings Block [Feature] Layout Layout block support, its UI controls, and style output. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended

Comments

@karmatosed
Copy link
Member

I seem to be able to set padding but setting the margin has no effect on header blocks. This is interesting to me as I would have thought I could do both. It doesn't seem to be something lurking in the theme I am using as that's super minimal, however, I would be curious to know if others have experienced this?

@karmatosed karmatosed added [Type] Question Questions about the design or development of the editor. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. labels Jul 31, 2021
@skorasaurus skorasaurus added the [Block] Heading Affects the Headings Block label Aug 2, 2021
@tellthemachines
Copy link
Contributor

Hi @karmatosed , by "header" do you mean a Header template part, or a Heading block? If the latter, I believe this is a bug, as the styles from theme.json have very low specificity (just an h2 in the front end, and an .editor-styles-wrapper h2 in the editor) and they are being overridden by more specific layout styles, e.g. body .is-layout-constrained > *.

I'm going to go ahead and mark this as a bug, because we definitely should be able to set margins for Heading blocks in theme.json 😅

@tellthemachines tellthemachines added [Type] Bug An existing feature does not function as intended [Feature] Layout Layout block support, its UI controls, and style output. and removed [Type] Question Questions about the design or development of the editor. labels Oct 19, 2022
@tellthemachines
Copy link
Contributor

Closing since #47858 has now been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Feature] Layout Layout block support, its UI controls, and style output. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants