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

Extra spacing (margin) around h1-h6 elements when empty #2708

Closed
kimberlyoleiro opened this issue Jun 9, 2023 · 0 comments · Fixed by #2770
Closed

Extra spacing (margin) around h1-h6 elements when empty #2708

kimberlyoleiro opened this issue Jun 9, 2023 · 0 comments · Fixed by #2770
Assignees
Labels

Comments

@kimberlyoleiro
Copy link

Describe the current behavior

The collage section is showing extra vertical spacing (margin) on the header (h2) when it's empty. As seen on the Dawn demo store's lookbook page https://theme-dawn-demo.myshopify.com/pages/lookbook-summer
https://videobin.shopify.io/v/zXzrkj

Describe the expected behavior

  • The vertical spacing around the section should be the same as the padding settings (8px) in this case
  • Empty heading elements should not appear, nor have styles applied to them

Version information (Dawn, browsers and operating systems)

  • Dawn Version: 10.0.0d

Possible solution

  • So we can either add a logic around the h2 to not output anything or
  • OR add some whitespace hyphen so no empty space is outputted in the h2 tag if no heading is added.
  • Check all headings that might have the same formatting as in my screenshot and add some whitespace hyphens if/where needed.
  • Fix prettier plugin formatting

Considerations

  • When choosing whether to remove whitespace or NOT render empty elements, please optimize for how screen readers and search crawlers index the page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants