Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Twoslash) Bug: Incorrect line-height for code snippets in Twoslash popups #31

Closed
IMax153 opened this issue Dec 5, 2024 · 1 comment · Fixed by #35
Closed

(Twoslash) Bug: Incorrect line-height for code snippets in Twoslash popups #31

IMax153 opened this issue Dec 5, 2024 · 1 comment · Fixed by #35
Labels
bug Something isn't working twoslash expressive-code-twoslash

Comments

@IMax153
Copy link
Contributor

IMax153 commented Dec 5, 2024

Describe the bug

The line-height for code lines does not seem to be propagating into code snippets in the Twoslash popup container. See screenshot below.

On the Effect website, we've worked around this like so: https://github.com/Effect-TS/website/blob/411eb3ee01950f13f903404d48a15a7a5063bb44/content/src/styles/twoslash.css#L9

To Reproduce

  1. Create a Twoslash code snippet on your site for a method with JSDocs that include code examples
  2. Observe the code example in the rendered popup has smaller line-height than the parent

Expected behavior

Code snippets in the Twoslash popup should render with the same line-height as the parent code snippet.

Screenshots

CleanShot 2024-12-05 at 14 42 33

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@IMax153 IMax153 added bug Something isn't working twoslash expressive-code-twoslash labels Dec 5, 2024
@Adammatthiesen
Copy link
Member

yup... this is why i hate CSS... will resolve! (might also adopt your overrides from that CSS file all together...)

Adammatthiesen added a commit that referenced this issue Dec 16, 2024
@Adammatthiesen Adammatthiesen mentioned this issue Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working twoslash expressive-code-twoslash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants