code-surfer icon indicating copy to clipboard operation
code-surfer copied to clipboard

Set visual line-height on `pre` or `code` elements?

Open karlhorky opened this issue 4 years ago • 0 comments

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?

karlhorky avatar May 16 '21 10:05 karlhorky