Why are code blocks so narrow?

Status
Not open for further replies.

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
A recent thread with a SMART error posted the SMART output (which is good), in code tags (which is also good), but the code block in the post was so narrow as to make it nearly impossible to read:
upload_2018-3-28_19-50-59.png

Since code blocks don't wrap (which is good), it'd be nice if 25+% of the width wasn't wasted.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I think it's actually the combination of CODE blocks and spoilers. That's been a bit of a nuisance, but it was considered to be a low-priority issue since it doesn't happen that often.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
It's so a huge code block (like a long log dump) doesn't make the page unmanageable if you've already read through the code.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
CODE blocks already do that. They have an independent scrolling domain
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Maybe we should just disable spoiler tags, if that's possible.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
It's probably doable, but it breaks some legitimately useful functionality (it's useful in signatures, to some extent).
 
Joined
Jan 18, 2017
Messages
525
I do like the spoiler tag personally would be sad to see it go, it's rare that this comes up AFAIK I feel like it could probably be ignored plus even with the wasted space it doesn't appear to me to be difficult to read.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
even with the wasted space it doesn't appear to me to be difficult to read.
...except that the right half of each line is hidden, so you have to scroll from side to side. For each line. Yes, that's very difficult to read.
 
Joined
Jan 18, 2017
Messages
525
What resolution is your display at I was just looking at another nested code block I did and it displays clearly on my screen but I'm at 1920x1080 currently

Edit:wow even at 1440x900 I had a scroll bar.....
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
even at 1440x900
...which is what I was using on that machine. It's a 15" laptop, so it doesn't have tons of screen space, but it's enough for most purposes. But when the right third of the window is taken up by ads, and the left 20% by user avatars, and 25% of the remaining width isn't used...
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
It looks like this could be fixed by changing the CSS.
There's a rule for ".bbCodeSpoilerText" that puts the right margin at 166px. If that were deleted or lowered the spoiler section would extend all the way to the edge of the post box.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
@JoshDW19, I remember this came up some time ago, but don't remember exactly what frustrated our intentions back then.
 

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
893
I work on theme Ganz großes Kino, so when I take some free time to look at it, I ought to be able to fix the situation for that family of themes. The other themes, especially the 'official' one, could be adapted once I had a useful solution in my own. If and when any effort is made on either, I will mention it in a future post. BTW, it has been a while since I looked at the themes so it may take a bit of time simply to re-orient myself.
 
Status
Not open for further replies.
Top