[opensuse-web] forums: scrolling for code output

http://fm.no-ip.com/SS/opensuseforumscroll01.png shows the problem I'd like to see fixed. Setting a minimum font size to enforce legible text is the immediate cause of the scroller, but the page can and should be restyled so this doesn't happen. Better yet, respect visitors by making the text big enough it the first place, so that the minimum size needn't be put into play. e.g. s/body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small}/body{font:100%/1.231 arial,helvetica,clean,sans-serif;*font-size:medium;*font:medium}/ in main-rollup.css. Also, leave the newlines that are in the source in the files actually used by the pages, so that hunting down this kind of trouble's root isn't so difficult. The compaction offered by stripping them pales in comparison to the absurd weight of the css files overall, totalling over 150kbytes on the page I was looking at: http://forums.opensuse.org/forums/english/get-technical-help-here/install-bo... -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-web+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-web+help@opensuse.org

Hello, on Sonntag, 21. August 2011, Felix Miata wrote:
main-rollup.css. Also, leave the newlines that are in the source in the files actually used by the pages, so that hunting down this kind of trouble's root isn't so difficult.
I wouldn't be too surprised if main-rollup.css is merged from several CSS files. You should try firefox + firebug extension - it makes hunting CSS issues quite easy.
http://forums.opensuse.org/forums/english/get-technical-help- here/install-boot-login/463657-grub-error-17-when-installing-suse-11-4- a.html
The main problem is that the HTML code contains <pre class="bbcode_code" style="height:192px;"> If I remove the hardcoded height, no scrolling is needed. I don't know why the height is hardcoded, it is definitively a bad idea. Besides that, main-rollup.css should be slightly changed so that the scrollbars are only displayed when needed. Additionally a max-height for <pre> would make sence IMHO. .bbcode_container div.bbcode_code, .bbcode_container pre.bbcode_code { overflow:auto; /* instead of "overflow:scroll" */ max-height:500px; /* optional */ Oh, and using main-rollup.css?d=$number results in firefox always re- requesting the CSS file on every page load. The server reply is always a "304 Not Modified", but without the attached ?d=$number firefox would probably use the cached file instead of re-requesting it each time. Regards, Christian Boltz -- Die Lösung ist denkbar einfach und naheliegend: Ich bin ein Trottel. Aber das wussten wir ja schon. :-) [Ratti in suse-linux] -- To unsubscribe, e-mail: opensuse-web+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-web+help@opensuse.org

On 2011/08/21 16:37 (GMT+0200) Christian Boltz composed:
Felix Miata wrote:
main-rollup.css. Also, leave the newlines that are in the source in the files actually used by the pages, so that hunting down this kind of trouble's root isn't so difficult.
I wouldn't be too surprised if main-rollup.css is merged from several CSS files.
You should try firefox + firebug extension - it makes hunting CSS issues quite easy.
I've been using Web-Developer extension since before Firebug existed. It works fine for these uses, except when newline stripping as described on http://developer.yahoo.com/yui/compressor/ is employed, as here. Hopefully the overdue update to WDx will address this growing Yahoo-induced problem.
http://forums.opensuse.org/forums/english/get-technical-help- here/install-boot-login/463657-grub-error-17-when-installing-suse-11-4- a.html
The main problem is that the HTML code contains <pre class="bbcode_code" style="height:192px;">
If I remove the hardcoded height, no scrolling is needed. I don't know why the height is hardcoded, it is definitively a bad idea.
The problem, as usual, is the height is arbitrary (px), rather than sensible (em). Setting height in px is virtually ALWAYS a bad idea, as nearly always setting any size on anything in px.
Besides that, main-rollup.css should be slightly changed so that the scrollbars are only displayed when needed. Additionally a max-height for <pre> would make sence IMHO.
.bbcode_container div.bbcode_code, .bbcode_container pre.bbcode_code { overflow:auto; /* instead of "overflow:scroll" */ max-height:500px; /* optional */
Again, a height in px, totally arbitrary, since the actual size bears no predictable relationship to any legible size (e.g. 1em). Web page stylists ought to have a minimum age, preferably at least 60, but at least 40, so that they should have acquired more than a token bit of wisdom on visual acuity issues and their impact on web users. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-web+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-web+help@opensuse.org

Hello, on Sonntag, 21. August 2011, Felix Miata wrote:
On 2011/08/21 16:37 (GMT+0200) Christian Boltz composed:
Felix Miata wrote:
main-rollup.css. Also, leave the newlines that are in the source in the files actually used by the pages, so that hunting down this kind of trouble's root isn't so difficult.
I wouldn't be too surprised if main-rollup.css is merged from several CSS files.
You should try firefox + firebug extension - it makes hunting CSS issues quite easy.
I've been using Web-Developer extension since before Firebug existed. It works fine for these uses, except when newline stripping as described on http://developer.yahoo.com/yui/compressor/ is employed, as here. Hopefully the overdue update to WDx will address this growing Yahoo-induced problem.
I know (and use) the Web-Developer extension too, but Firebug is much better when it comes to hunting CSS issues. You can click an element and it will give you all styles that influence it. From top to down, with overridden values stroke through and a note from which line in which CSS file each rule comes. The styles are re-formatted (one rule per line) so stipped newlines are not a problem. And all styles are also editable. In short: give Firebug a try ;-)
http://forums.opensuse.org/forums/english/get-technical-help- here/install-boot-login/463657-grub-error-17-when-installing-suse-11-4- a.html
The main problem is that the HTML code contains
<pre class="bbcode_code" style="height:192px;">
If I remove the hardcoded height, no scrolling is needed. I don't know why the height is hardcoded, it is definitively a bad idea.
The problem, as usual, is the height is arbitrary (px), rather than sensible (em). Setting height in px is virtually ALWAYS a bad idea, as nearly always setting any size on anything in px.
In this case setting the height at all is a bad idea. The <pre> knows itsself how big it needs to be ;-)
Besides that, main-rollup.css should be slightly changed so that the scrollbars are only displayed when needed. Additionally a max-height for <pre> would make sence IMHO.
.bbcode_container div.bbcode_code, .bbcode_container pre.bbcode_code {
overflow:auto; /* instead of "overflow:scroll" */ max-height:500px; /* optional */
Again, a height in px, totally arbitrary, since the actual size bears no predictable relationship to any legible size (e.g. 1em).
While I understand that you dislike px (for a good reason), I'd say it's a good choice here. The max-height:500px rule limits the height to 500px, which means the <pre> area should fit on every screen. If the text in the <pre> is bigger, it gets a scrollbar added. Doing this with em is quite pointless because your screen resolution won't grow with increasing font size ;-) and having a <pre> with a scrollbar that grew heigher than your screen (or what you have available in the browser window) is a nightmare. The only better option is to make it dependent on the viewport height, but that makes the CSS more interesting[tm] or might even require JavaScript. Another alternative would be not to limit the height - but that will become annoying on really long <pre> texts (1000 lines of log entries) IMHO. Even more when combined with overflow:auto - in this case you'll have a horicontal scrollbar at the end of the <pre> and have to scrool down to be able to use it.
Web page stylists ought to have a minimum age, preferably at least 60, but at least 40, so that they should have acquired more than a token bit of wisdom on visual acuity issues and their impact on web users.
Oh yes. "Take off your glasses" would already be a good requirement ;-) Regards, Christian Boltz -- [GUI vs. Command-Line] Einen ähnlichen Streit wird es in 20 Jahren auch geben, wenn die "2D-Screenfanatiker" auf die "VR Fans" losgehen und wieder ein Streit vom Zaun bricht der an Sinnfreiheit kaum zu überbieten ist. [Phillip Richdale in suse-linux] -- To unsubscribe, e-mail: opensuse-web+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-web+help@opensuse.org

On Sunday, August 21, 2011 02:49:17 PM Christian Boltz wrote:
Oh yes. "Take off your glasses" would already be a good requirement ;-)
" ... but I can't see a thing without ... " (Spending long hours behind monitor makes eyes used to short fixed focus, and glasses are actually needed for anything closer or farther.) -- Regards, Rajko -- To unsubscribe, e-mail: opensuse-web+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-web+help@opensuse.org
participants (3)
-
Christian Boltz
-
Felix Miata
-
Rajko M.