CSS for code-blocks; limit visible height to fit onscreen and scroll well #1374
Replies: 4 comments 2 replies
-
|
So, you'll get — for example: In stead of (current implementation): I see the plusses and minusses of both solutions. I like to stick with the current implementation, also because I think it's much more common practice. You can see much more of the file without interaction, preserving flow understanding. And, if a code block gets too tall, you could use the details shortcode — like I did for example for the Update mounts section in the Doks v1.8 upgrade guide. |
Beta Was this translation helpful? Give feedback.
-
|
The thing I like about this approach is that is responsive - how long 'tall' is depends on the device. However I'm happy to keep it as custom CSS. |
Beta Was this translation helpful? Give feedback.
-
|
Fair enough. I have gotten frustrated enough with visiting pages with horizontal scrolls at the the bottom of tall code blocks. They were a recent pain point for me, so I wanted to do something different (and I didn't want use |
Beta Was this translation helpful? Give feedback.
-
|
😆 I missed the memo on that one. The last time I tried getting horizontal scroll to work was some years ago, and it was hit and miss! Nice to know it works in Xfce now (I did a search after reading you message). Now if I can remember I have that option... 👀 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Just wondering if you would be interested in a PR for the following CSS:
Beta Was this translation helpful? Give feedback.
All reactions