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

Add padding-bottom: 50vh for <main> #2108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ddystopia
Copy link

Hello,
This PR introduces a simple tweak: adding extra padding to the bottom of the content area in mdBook.

Here's why it might be a good idea:

  • More Comfortable Reading: This change lets users scroll the text up to the center of their screen. It's often easier to read from the middle of the screen and can help reduce eye-strain during long reads.

  • Familiar Feel: This 'scroll-past-end' feature is common in popular code editors like VSCode and Atom. It might make mdBook feel a bit more like home for those folks.

This change doesn't break anything and can easily be overridden by custom stylesheets if needed.

Of course, we know changes like these can be a matter of personal preference. So, this PR is completely open for discussion. If you think it's not a great fit for the project, no worries at all if the PR gets closed.

Looking forward to hearing your thoughts!

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Jun 29, 2023
@Ddystopia
Copy link
Author

@rustbot label +A-style

@rustbot rustbot added the A-Style Area: Style (CSS, etc.) label Jun 29, 2023
@GiorgioReale
Copy link
Contributor

It seems like a good idea, but i think it's better to restore the previous printing style.

.content {
    ...
    padding: 0 5px 50vh 5px;
}

@media print {
    .content {
        padding: 0 5px 50px 5px;
    }
}

@Ddystopia
Copy link
Author

It seems like a good idea, but i think it's better to restore the previous printing style.

.content {
    ...
    padding: 0 5px 50vh 5px;
}

@media print {
    .content {
        padding: 0 5px 50px 5px;
    }
}

in file src/theme/css/print.css there is a style

#content {
    max-width: none;
    margin: 0;
    padding: 0;
}

Id has more priority then class, so padding would already be zero.

@GiorgioReale
Copy link
Contributor

@Ddystopia 😅 Oops, sorry. I didn't see the ID #content, i only checked the class .content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Style Area: Style (CSS, etc.) S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants