Skip to content

Resolve "Embedded snippets numbering and scrolling is off"

What does this MR do?

This MR resolves two issues with the display of embedded snippets:

  • Scrolling in the snippet only applies to the code, not the line numbers (so line numbers stay the same, while the code changes). Fixed by moving overflow-x one level higher to the containing div
  • Line numbering is off in general, especially for larger snippets (see video). Fixed by setting display: inline-block for the code lines, as it's done already for all the other code highlighting already.

Additionally, I changed a probably erroneous min-height to line-height, but I noticed no visible change caused by this.

Screenshots

Before

Video Before

After

Video After

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Closes #207934 (closed)

Merge request reports