Github Gist bug when embedded into WordPress with the theme Twenty Sixteen

If you are using the theme Twenty Sixteen in WordPress, when you embed a Gist into a blog post, you could have the following issue with the line numbers not being displayed properly.

2016-10-03-10_52_2gist-bad

This is due to the width: 100%; which comes from the Twenty Sixteen theme’s CSS.

If you want to fix it, you can apply this CSS rule in the theme editor at the end.

It will then fix the line numbers display as per screenshot below and won’t affect the theme.

2016-10-03-10_53_46-gist-good