Skip to content

Improve Rust Documentation & Reference on mobile #21133

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

Merged
merged 1 commit into from
Jan 16, 2015
Merged

Improve Rust Documentation & Reference on mobile #21133

merged 1 commit into from
Jan 16, 2015

Conversation

iKevinY
Copy link
Contributor

@iKevinY iKevinY commented Jan 14, 2015

Just a couple of tweaks to improve the appearance of pages like The Rust Reference on mobile to advance the progress of #20850. Changing the viewport wasn't quite good enough to make it mobile-friendly, as large tables forced the page to become wider than the screen width. Using overflow-x, tables that are too large become horizontally scrollable instead of forcing the entire page to become horizontally scrollable.

Also, there was at least one case where an extremely long piece of inline code was wider than the actual width of the screen (std::ptr::copy_nonoverlapping_memory), so I changed word-wrap to allow inline code to break in the middle of words instead of only text within pre tags.

This isn't a change included in this PR, but rather something up for discussion. Currently, code blocks that contain long lines simply wrap onto the next line. What if rather than wrapping, they were horizontally scrollable instead? I'm not sure what the general preference is regarding this.

r? @steveklabnik

- Tables that are too wide for the screen scroll horizontally.
- Inline code that would force the page to become wider than the width
  of the screen is broken in the middle of the word.
@steveklabnik
Copy link
Member

I'm not sure what the preference is either, but this is a pretty strict improvement, so let's get it in. Thanks! :)

bors added a commit that referenced this pull request Jan 14, 2015
Improve Rust Documentation & Reference on mobile

Reviewed-by: steveklabnik
bors added a commit that referenced this pull request Jan 15, 2015
Improve Rust Documentation & Reference on mobile

Reviewed-by: steveklabnik
bors added a commit that referenced this pull request Jan 15, 2015
Improve Rust Documentation & Reference on mobile

Reviewed-by: steveklabnik
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 15, 2015
Just a couple of tweaks to improve the appearance of pages like [The Rust Reference](http://doc.rust-lang.org/reference.html) on mobile to advance the progress of rust-lang#20850. Changing the viewport wasn't quite good enough to make it mobile-friendly, as large tables forced the page to become wider than the screen width. Using `overflow-x`, tables that are too large become horizontally scrollable instead of forcing the *entire page* to become horizontally scrollable.

Also, there was at least one case where an extremely long piece of inline code was wider than the actual width of the screen (`std::ptr::copy_nonoverlapping_memory`), so I changed `word-wrap` to allow inline code to break in the middle of words instead of only text within `pre` tags.

This isn't a change included in this PR, but rather something up for discussion. Currently, code blocks that contain long lines simply wrap onto the next line. What if rather than wrapping, they were horizontally scrollable instead? I'm not sure what the general preference is regarding this.

r? @steveklabnik
@bors bors merged commit 5a16ceb into rust-lang:master Jan 16, 2015
@iKevinY iKevinY deleted the mobile-rustdoc branch January 16, 2015 06:04
@iKevinY iKevinY mentioned this pull request Jan 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants