kentcdodds/old-kentcdodds.com

Highlighted lines in code snippets don't take full width

Closed this issue · 2 comments

The problem arises when there is a scrollbar present. More here

However, you will notice that when a highlighted line runs wider than the surrounding code block container (causing a horizontal scrollbar), its background won’t be drawn for the initially hidden, overflowing part. :(

Screen Shot 2019-03-26 at 2 38 39 PM

This website isn't using gatsby-remark-prismjs but the problem is similar

Sure, can try.

Edit: Although the changes should be done here

https://github.com/kentcdodds/kentcdodds.com/blob/86b153136d485c604913e45f93a8f119b40021fb/src/components/mdx/code.js#L34-L36

Since we don't want pre to wrap but have a wrapper element do it.