Skip to content

ApiCodeBlock CSS .theme-code-block-highlighted-line #576

Closed
@pmarschik

Description

@pmarschik

Describe the bug

With version 2.0.0-beta.3 you've forked the CodeBlock component to ApiCodeBlock.
When I use the plugin and the built-in code blocks with the showLineNumbers the formatting breaks.

Expected behavior

Using normal code blocks while having the docusaurus-openapi-theme activated should not break formatting.

Current behavior

Formatting breaks when using code blocks with showLineNumbers

Possible solution

For most CSS classes you've added the prefix openapi- to avoid name clashes.
For the component ApiDemoPanel/ApiCodeBlock/Line the global style .theme-code-block-highlighted-line wis defined.
I've patched the style ApiDemoPanel/ApiCodeBlock/Line/_Line.scss to remove the style, which worked for me.

Your Environment

  • Version used: 2.0.0-beta.3
  • Environment name and version:
    • docusaurus 2.4.0
    • pnpm 8.5.0 for building

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreviewing 👀Undergoing manual audit to determine if issue should still be active

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions