Skip to content

docs: add spacing around MDX code blocks - #9762

Merged
weronikaolejniczak merged 3 commits into
elastic:mainfrom
Saithej2k:fix/mdx-code-block-spacing
Jul 2, 2026
Merged

weronikaolejniczak merged 3 commits into
elastic:mainfrom
Saithej2k:fix/mdx-code-block-spacing

Conversation

@Saithej2k

Copy link
Copy Markdown
Contributor

Summary

  • Add vertical spacing around fenced MDX code blocks using the docs theme spacing token.

Testing

  • git diff --check

Closes #9730

@cla-checker-service

cla-checker-service Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

💚 CLA has been signed

@github-actions

Copy link
Copy Markdown

👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually?

@github-actions github-actions Bot added the community contribution (Don't delete - used for automation) label Jun 26, 2026
@Saithej2k
Saithej2k marked this pull request as ready for review June 27, 2026 00:46
@Saithej2k
Saithej2k requested a review from a team as a code owner June 27, 2026 00:46
@weronikaolejniczak

Copy link
Copy Markdown
Contributor

Hey @Saithej2k please make sure you sign CLA before we proceed with the review. Thanks for the contribution!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds consistent vertical spacing around fenced MDX code blocks in the Docusaurus docs theme, aligning code snippets with the existing “content vertical spacing” rhythm used by other MDX block elements.

Changes:

  • Apply margin-block: var(--eui-theme-content-vertical-spacing); to the docs theme CodeBlock wrapper (EuiCodeBlock) to create vertical separation from surrounding content.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
1 visual difference(s) found - expand to review, then click Approve visual changes to update baselines

euipopover (1 difference)

StoryBeforeAfterDiff
playground desktop

@weronikaolejniczak weronikaolejniczak added the skip-vrt Skips Visual Regression Testing job in CI (clearly state why you're using it in your PR) label Jun 30, 2026
@weronikaolejniczak

Copy link
Copy Markdown
Contributor

@Saithej2k could you add a changelog?

@elastic elastic deleted a comment from infra-vault-gh-plugin-prod Bot Jun 30, 2026
@Saithej2k

Copy link
Copy Markdown
Contributor Author

Added the changelog entry in packages/docusaurus-theme/changelogs/upcoming/9762.md.

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it looks alright. Just one blocking code comment. Thanks, @Saithej2k!

@weronikaolejniczak

Copy link
Copy Markdown
Contributor

buildkite test this

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🟢 Thank you for contributing, @Saithej2k 🙏🏻

@weronikaolejniczak
weronikaolejniczak merged commit 1d6e247 into elastic:main Jul 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community contribution (Don't delete - used for automation) skip-vrt Skips Visual Regression Testing job in CI (clearly state why you're using it in your PR)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Add margin to MDX code blocks

3 participants