Make tall code blocks scrollable#1146
Make tall code blocks scrollable#1146fregante merged 19 commits intorefined-github:masterfrom rooneyg21:bug-tall-code-scroll-1123
Conversation
|
This looks good! It's smart to cut off in the middle of a line, but what if it's cut off on an empty line? Then it's not clear that there's more content. I think we should make it more obvious then. How about a slight bottom inset shadow to indicate there's more content? @bfred-it Thoughts? |
|
@sindresorhus it’s hard to do that just with CSS because there’s no way to say “show only when there’s overflow.” It’d need some css trick |
|
This should probably be merged with the Gist max-height just to have them both in the same place and have both of them with the "scroll shadow" that Sindre suggested. |
|
Haven't had a chance to check this out in a while. Adding a shadow would make it very clear that there is more content there if they scroll. Will look into it this weekend 👨💻 |
|
Tests:
|
985:30 ✖ Expected newline after "," in a value-list-comma-newline-after
multi-line list
|
@sindresorhus the only problem with those solutions is that they are |
|
@bfred-it Let's just use JS then, to make it appear. |
|
Related: dear-github/dear-github#166 |
|
Closing this PR since the suggested solution is completely different |
|
We're overthinking it. GitHub's own code embeds don't show any shadows. Same for StackOverflow (example) We should drop the shadow and merge this |
|
Looks good, but needs to be mentioned in the readme. (Mostly so that the GitHub Papercuts team can more easily borrow the feature). |
lol so true |
@arungalva are you still available to make these final changes to merge your feature? :) |
|
Given this is done directly in |
|
NVM, just found I can override the CSS. |
|
@dwelle Is there an updated way to disable this? The custom css override is not working for me on firefox. Thanks! |
It works if you add I updated the example above |




closes #1123