W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: Controlling size of a tab character (U+0009)

From: David Dorward <david@dorward.me.uk>
Date: Tue, 09 Dec 2008 10:06:29 +0000
Message-ID: <493E4325.4080403@dorward.me.uk>
To: Ambrose Li <ambrose.li@gmail.com>
CC: Anne van Kesteren <annevk@opera.com>, David Woolley <forums@david-woolley.me.uk>, www-style@w3.org

Ambrose Li wrote:
>> Why not? That's exactly how tab is defined in CSS today. (And how 
>> most text
>> editors go about it, as far as I know.)
>>     
>
> I doubt it. Otherwise AB<tab>C and A<tab>C will never line up under
> any circumstances;
I can't remember the last time I used a text editor that didn't use a 
monospace font (where that system works perfectly). It's an idea system 
when dealing with rendering code.

For Emacs, (setq default-tab-width 4) will configure it. In Vim: set 
tabstop=4

Word Processors, on the other hand, generally use different systems. 
Something along the lines of:

    A tab stop is defined as a <length> from the left edge of content. 
(This might be different in RTL languages).

    A tab character breaks the current inline data, and resumes 
rendering at the first tab stop with a length greater then the length 
from the left edge of the content to the right edge of the previous 
character.

If we wanted to define both methods in CSS we might try something along 
the lines of:

tab-size: <integer>
tab-stops: <length> [, <length> ]*
tab-mode: stops | size

We might want to add provision for defining tab stops along the lines of 
"Every 15mm".

-- 
David Dorward
http://dorward.me.uk/
Received on Tuesday, 9 December 2008 10:07:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:17 GMT