Skip to content

Code block spacing issue compared to default Docusaurus styles #188

@sm1990

Description

@sm1990

In our current setup, code blocks do not maintain proper spacing between lines, making them harder to read.

However, the default Docusaurus code blocks render with correct line spacing and visual clarity. This suggests that our custom styles or overrides may be affecting the default behavior.

Expected behavior

  • Code blocks should have consistent and readable line spacing (similar to default Docusaurus styling)
  • Proper padding and line height should be applied
Image

Actual behavior

  • Lines appear cramped with insufficient vertical spacing
  • Reduced readability compared to standard Docusaurus code blocks
Image

Possible cause

  • CSS overrides affecting pre, code, or Prism classes (e.g., line-height, padding, or display properties)

Suggested fix

  • Compare with default Docusaurus styles
  • Ensure line-height and padding are not overridden unintentionally
  • Verify Prism theme integration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions