Skip to content

Adjust alignment of codeblock "Copy code" button

What does this MR do and why?

The copy code button for code blocks rendered in markdown content was not aligned evenly to the top and right edges of the code block.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image
image image

How to set up and validate locally

  1. Check out this branch
  2. Edit an issue description, comment or MR description and add a code block
  3. Hover over the code block to show the copy button
  4. it will be the same distance from the top and the right edge (this is $gl-spacing-scale-3, or 0.5rem/8px)

Merge request reports