-
Notifications
You must be signed in to change notification settings - Fork 1.3k
bs4_book: no scroll on x overflow and correct copy btn placement #1187
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Can you add NEWS bullet so that we track the different changes ?
I will triage and merge the different bs4_book() items at the end before release to make a single big part on all the changes. Thanks!
I'm not sure this should be merged as this can hide text, though? |
Thanks. I see. This is an issue because we show the copy button always, with no opacity. It would probably no be an issue if the button was shown on hover only (like in This is a topic that we are still thinking about (#1040 and associated PR #1041). Best is to deal with this PR when we will deal with the other. |
Solution I put together with DevTools:
pre .copy {
float: right;
margin-left: 1rem;
margin-bottom: 1rem;
} |
@apreshill we should look into that in the same bundle as the copy button improvement, and uniformisation between outputs. What are your thoughts on this ? |
Hi @cderv looking into this right now. Also another point of comparison is GitHub's new copy icon UI: Looks like they actually do the scrolling underneath the button on hover. I like the padding-right idea, but needed to add 60px to clear the button instead of 25px. Here is how that looks: I wish the padding could be a bit more narrow. For completeness, here is @maelle's tweak: if we keep the word "copy" I like this solution: Using this space to think out loud here:
|
I think it makes sense to match quarto here; I'm fine with the icon. |
Conflicts: inst/resources/bs4_book/bs4_book.js
This branch is now tested in https://cderv.github.io/bs4booktesting/wrap-and-scroll/ Current master looks like this: https://cderv.github.io/bs4booktesting/ So this PR:
@apreshill to discuss. |
Conflicts: inst/resources/bs4_book/bs4_book.js
[skip ci]
[skip ci]
Fix #1086
Also related #1040 (currently the copy-code button might hide some code)