-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Buttons still overlap code #1322
Comments
What about instead of #1508, we add |
I think possible approach is move the code downward by 1 line? So buttons have their own line? |
I posted #1806 with a proposed fix. I would appreciate if you could take a look and see if you have any thoughts. I posted a demo at https://ehuss.github.io/rust-book/. If you could look through some examples, try different browsers and platforms, different color themes, etc. If you have access to Android, that would particularly be nice to test since I don't have access to that. |
Here's an attempt where the buttons only show on hover: https://ehuss.github.io/rust-book/hover/ On mobile safari, hover can be triggered by just tapping the code block. I'm guessing mobile chrome does the same? I like the idea of making the buttons only show on hover. I think the buttons are generally distracting and not something I interact with often. It also seems that having a "Copy" button only show on hover is a more common pattern (such as on GitHub). That being said, I'm not super happy with how it looks. I am not a designer, but they feel a little clunky now. Any thoughts? |
mobile chrome is very bad about hover interactions, you usually have to tap and hold the block and the timing is hard to get right. |
Same as #389 but with an example from https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html#generic-lifetimes-in-functions:
This screenshot was taken on iOS with Safari 13.
You can also reproduce by zooming to 200% on desktop (although I don't expect anyone's browsing the book that way):
The text was updated successfully, but these errors were encountered: