Skip to content

Set visual line-height on pre or code elements? #117

Open
@karlhorky

Description

@karlhorky

Hi @pomber !

I'm trying to use the new version of code-surfer, and there is a strange behavior with line-height.

I am trying to set line-height on the pre and code elements like this:

export const mdxDeckTheme = {
  styles: {
    CodeSurfer: {
      pre: {
        lineHeight: 1.3,
      },
      code: {
        lineHeight: 1.3,
      },
    },
  },
};

This does apply the line-heights to those elements, but does not allow for setting the visual line-height (the height of a line of code, proportional to the font-size).

This doesn't appear to be possible with code-surfer... or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions