pages-themes / slate

Slate is a Jekyll theme for GitHub Pages
https://pages-themes.github.io/slate/
Creative Commons Zero v1.0 Universal
301 stars 975 forks source link

Fix code overflow #10

Closed pat-laugh closed 7 years ago

pat-laugh commented 7 years ago

Code sections take too much space at the right.

This fix keeps them wholly inside the inner section. Also, it makes the gray padding even on all sides, whereas right now there lacks padding at the right.

benbalter commented 7 years ago

Thanks! Can you provide a before / after screenshot?

pat-laugh commented 7 years ago

Notice in before screenshots the code sections don't align with the horizontal bar at the top.

Full screen before: full-screen-old Full screen after: full-screen-new

Small screen before (if user scrolls to the right): small-screen-old Small screen after (user can't scroll): small-screen-new

By the way, this makes another issue more evident in the case of long lines of code: Before: long-line-old After: long-line-new In both cases, if the user scrolls in the code section, it does something like this: long-line-issue

This probably has to do with the text within the code tag overflowing into the pre tag and the scroll bar being set inside the pre tag and not the code tag.

benbalter commented 7 years ago

Nice. Thanks @pat-laugh!