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

fix: Website: Make code blocks scrollable on mobile view #1046

Merged
merged 5 commits into from
Aug 21, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions website/public/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,14 @@ kbd.keystroke {
}
}

/* Scrollable container */
@media screen and (max-width: 670px) {
pre, code {
nikohoffren marked this conversation as resolved.
Show resolved Hide resolved
overflow-x: scroll;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Is there a reason you chose scroll instead of auto? Don't think we want code blocks to have a scroll bar if the code isn't that wide.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, i change it to auto.

max-height: 400px;
}
}

/*
* quick-lint-js finds bugs in JavaScript programs.
* Copyright (C) 2020 Matthew "strager" Glazar
Expand Down
Loading