-
Notifications
You must be signed in to change notification settings - Fork 187
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
Code block should avoid auto-wrap #58
Comments
@calfzhou thanks a lot for reporting this issue. I have fixed the issue to the best of my knowledge. Can you please confirm the fix? I have also made a change that hides line numbers on tablets and phones to save space for actual content. What do you think of it? You can see it by changing your browser window size. @tshepang you too please share your opinion on this "hiding" feature. |
Thanks @talha131 for this fix! It works well on my blog :) And i like this "auto hiding" feature very much. One more opinion is that, "line numbers" should expand its column width instead of show a scroll bar. A scroll bar on this thin column makes user hard to read the numbers. Style |
damn, that was a horrible bug |
is good @talha131 |
@tshepang thank you for your feedback.
I agree. I have fixed it. But there is a bug in my implementation which I could not fix with all my efforts. If your code snippet has more 100 lines then your line numbers will be cut from the right. But for 1-99 it works fine. You are quite knowledgeable about CSS. Can you please suggest a fix?
I have added it though I cannot see this issue on my system. I couldn't notice it earlier because my scroll bars are set to auto hide. Keep coming up with feedback, patches and suggestions. |
@talha131 , the problem is really hard to solve. I tried several times but cannot find a better solution. I remembered that my previous Wordpress code block plugin wraps the Pygments generate a naked |
@calfzhou Thanks for investigating this issue. I think current solution is a good middle ground. I don't think users usually post 100+ lines of code in a post. |
You are using Mac, am I right? I tried my Mac system today, and found the cool scroll bar, it is auto-hide. Is it possible to make it work on every system using CSS? |
Scroll bar look and behavior is a function of OS. Some apps create their custom scroll bars using third party widgets. In any case, its behavior and look is a function of OS or app. That's why it can't be controlled with CSS. |
Shown as the following screenshot, the long-code-line wrapped, and won't align correctly with line numbers.
And if the line number is bigger than 9 (has more than one digits), it will wrap too! Which makes the code-block looks ugly.
The text was updated successfully, but these errors were encountered: