|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2004-10-17 13:33:13
On 10/13/04 1:41 AM, "Daryle Walker" <darylew_at_[hidden]> wrote:
[SNIP]
> CODE
> {
> FONT-FAMILY: Courier;
> white-space: pre;
> }
>
> This last (non-brace) line says that multiple white-space characters are
> _not_ collapsed into a single space. This lets CODE acts as an in-line
> variant of PRE, but it violates what CODE usually does! I need the default
> space-collapsing behavior of CODE. If no one can give me a justification
> for that attribute, I'm going to erase it.
>
> Even if you can justify it, do this instead:
>
> CODE.my_special
> {
> FONT-FAMILY: Courier;
> white-space: pre;
> }
>
> Then call it like so:
>
> <p>Blah blah, please <code class="my_special">keep all of my
> spaces</code> blah blah.</p>
>
> That way people who need the default space-collapsing attribute of CODE
> don't get screwed. (Right now it's optimizing the [IMO] <1% wacky case and
> forcing extra work to get the usual semantics [that should take 99+% of the
> cases].)
As promised, I got rid of the "bad" settings. Specifically, I replaced:
CODE
{
FONT-FAMILY: Courier,
monospace;
white-space: pre;
}
with:
CODE
{
FONT-FAMILY: Courier,
monospace;
}
CODE.as_pre
{
white-space: pre;
}
This way, anyone that assumes the default spacing behavior gets it. But it
means that now any files that required the strange spacing are forced to
change their HTML code. (In other words, I possibly broke existing code for
better purity. Of course, I thought the existing solution was broken from
the start.)
If no one complains or changes their code, I guess that means that no one
needs the weird spacing (anymore). In that case, the new setting can be
eventually removed. (If that happens, the default setting can also be
removed, since it wouldn't really differ from browser defaults.)
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk