You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-dev@perl.apache.org by allan <la...@inet.uni2.dk> on 2002/02/05 01:24:00 UTC

-debate

hi

i hate to say this at this point, but i think i have found
out what i dislike about our current pre-sections.


it is the fact that the pre-section spans (or perhaps rather
divs) the whole
available width of the content box, even though the actual
text-content of the pre-section might only span whatever
amount of characters (which in my book is a bug). so if we
have some code with only 10 chars inside the whole coloured
pre-section will span across the content area.


do you rembember that awful table-hack i sent you, stas?
(just put a single-celled html-table around the pre-tags,
see below)

there you would end up with different sized pre-boxes
(totally depending on the longest code-line).


the advantage of that IMO is:

1) if there are more than one code-block on the same page
they are very likely to differ in sizes which from an
aethestic point of view might be look bad (though i dont
think so)
but this is much much more user-friendly simply because they
stand out by the simple nature of their different sizes. (and
if we decide on a light bg-colour they wont stand so much
out that they will interrupt/disturb the reading of the page
i think. i mean they wont exactly be eye-catchers.)


2) because these pre-blocks end up different sizes and often
wont span the whole content-width, they wont look like lots
and lots of headers down the page (like the titleheader has
a bg-colour that spans the whole width, likewise the current
pre-secs. so _currently_ the pre-secs in a way becomes
eye-catchers i think)


3) also, just by looking at the current pre-secs there will
often (when the code blocks dont have long lines) be lots
and lots of wasted white-space because of this 100% span.
well, its not white-space but more like light-blue-space.
this simply is extremely unelegant _and_ not very
user-friendly. in short, why do a user have to look at a
light-blue box full of emptiness?
(as a sitenote to this - we will in fact get more litteral
whitespace because we reduce the size of the coloured area.)


4) you can rest assured that this works everywhere (though
the current css ns4-hacked version seem to handle pre-secs
quite good)


*colours:

Stas Bekman wrote:
> > the lightest websafe gray is #CCCCCC - not bad, ill look
> > around for others though.
> 
> true, but it's much easier to read black text on a lighter fg, grey is
> not the best choice for this, even for the lightest shades of grey.


how about this "non"-colour which is also neither dark or
light, #CC9 :-)


*font-size:

also i dont understand they use of a larger font here
compared to our body-font. or rather i dont understand the
use of a smaller body-font.
maybe the face profont is smaller by nature i dont know
because i dont have it installed but monaco just looks way
bigger than the body, which is a shame IMO. they should be
more or less the same, no?

in my opinion the body font should always be exactly 1em
because that is exactly what the user would expect a body
font to be. and when this is 1em i dont mind fiddling with
for example the pre-font to be 0.9em or whatever. i still
dont think it should be larger than the body-font though.


./allan


-------
ex.
-------

<table cellpadding="1">
 <tr>
  <td class="pre-bg">
<pre>
$ code
$ more code
$ even more code
</pre>
  </td>
 </tr>
</table>
<br><br>
<table cellpadding="1">
 <tr>
  <td class="pre-bg">
<pre>
$ code
$ more code
$ even more code and even more code
</pre>
  </td>
 </tr>
</table>

and then:

td.pre-bg {
	background-color: #cccc99
}

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re:
-debate

Posted by Thomas Klausner <do...@zsi.at>.
Hi!

On Tue, Feb 05, 2002 at 01:10:20PM +0800, Stas Bekman wrote:
> || some text
> || ...
> || more text
> || ...
+1
because: no problems with large pre-lines, small windows etc.

How do you implement this? With CSS (border-left:2px;) ?

-- 
 D_OMM      +---->  http://domm.zsi.at <-----+
 O_xyderkes |       neu:  Arbeitsplatz       |   
 M_echanen  | http://domm.zsi.at/d/d162.html |
 M_asteuei  +--------------------------------+



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re:
-debate

Posted by Stas Bekman <st...@stason.org>.
allan wrote:

> Stas Bekman wrote:
> 
>>Thefore, rather than trying to find a bad compromise, the solution I'm
>>suggesting is completely different,
>>
>>The solution is not to use a bg color for pre sections at all. We use
>>the left vertical bar technique instead. I'll show the new solution when
>>I'm done with other things. The gist is that the <pre> section looks the
>>same as the rest of the text (though using a different font) but has a
>>left vertical bar:
>>
>>|| some text
>>|| ...
>>|| more text
>>|| ...
>>
>>This solution is used in books too.
>>
> 
> 
> looking forward to see it in action .-)

it's in cvs.

My machine seems to go broken, so I won't be able to make a snapshot. 
But update your cvs and re-build, you will see it.

-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re:
-debate

Posted by allan <la...@inet.uni2.dk>.
Stas Bekman wrote:
> Thefore, rather than trying to find a bad compromise, the solution I'm
> suggesting is completely different,
> 
> The solution is not to use a bg color for pre sections at all. We use
> the left vertical bar technique instead. I'll show the new solution when
> I'm done with other things. The gist is that the <pre> section looks the
> same as the rest of the text (though using a different font) but has a
> left vertical bar:
> 
> || some text
> || ...
> || more text
> || ...
> 
> This solution is used in books too.


looking forward to see it in action .-)


./allan

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org


Re:
-debate

Posted by Stas Bekman <st...@stason.org>.
Allan,

I don't like the content page looking like a puzzle. The text should 
flow like a river with no obstacles, and not like an urban road with 
many traffic lights. To give you an incentive to review your suggestion 
please look at other published works, mostly books. If the book editor 
chooses to use boxes for the examples -- they always use the same box 
width, don't they? And if they aren't the book looks bad if you have a 
few of these boxes on the same page.

Therefore I'm -1 on variable size boxes for <pre> sections. Though I 
understand your frustration in the current solution.

Thefore, rather than trying to find a bad compromise, the solution I'm 
suggesting is completely different,

The solution is not to use a bg color for pre sections at all. We use 
the left vertical bar technique instead. I'll show the new solution when 
I'm done with other things. The gist is that the <pre> section looks the 
same as the rest of the text (though using a different font) but has a 
left vertical bar:

|| some text
|| ...
|| more text
|| ...

This solution is used in books too.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org