Make CSS responsive to improve mobile layout #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before
On narrow viewports (e.g. a phone or a narrow window on desktop) the layout would break and there would be lots of horizontal scrolling and text spilling off the edge of the background

After
Responsive CSS keeps the layout nice on narrow viewports.

I also added a
lang="en"
attribute to each html file because apparently that's good for accessibility, SEO, and hyphenation behavior.Remaining issues
One potential fix is to add a gradient fade-out that indicates to the user that there's more content that they can't see without scrolling, like this:


But I couldn't figure out a way to implement that properly without modifying the html generator to add an extra wrapper div around each code block. Another solution is to have the entire black block scroll side to side, which would look like this, but proper implementation for this would also require an extra wrapper div.
Despite these problems, though, I think this PR is strictly an improvement on the existing CSS.