Re: controlling tab size

Allan Sandfeld Jensen wrote:
> I am guessing he wants to put his source code in a "white-space: pre" block, 
> and wants to control how tabs are converted.
> 
> That said. The ascii standard is that tabs are 8 spaces.

I wholly disagree that any standards body can define how indentation is to
*presented*. If presentation was legislated, CSS as a concept would cease to
exist anyway.

Eight spaces for me is too wide -- I use exactly one. My choice.

> That some editors choose to break the standard does not make a good idea to 
> extend this useless and incompatible non-standard to browsers.

What has this got to do with anything? Editors are free to display a tab as as 
many spaces they choose. Your problem may be with editors that read a tab and 
write spaces, breaking the original file. But we're not talking about that: 
we're talking about the visual presentation of a tab character. When you Save 
Page As, or select and copy the text, it will still be saved and copied as a tab 
character.

If you disagree with user customisation here, as with *ANY* part of the Web (and 
we all disagree with sites somewhere) feel free to use user CSS to set an 
override. Firefox users will find the Stylish extension fantastic for this job.

This is, after all, what CSS is about. Presentation. Author presentation. User 
presentation.

> The biggest problem with non-standard tab-size is that they regress very 
> poorly to standard (or old) viewers.

Since we're not physically altering the size of a tab (by converting it into 
spaces), old viewers will render the text exactly as given in the HTML: a tab 
character. I don't know what you mean by "Standard" viewers but any viewer will 
either a) render the text as stated (tab == tab) or b) render the text with CSS 
3 presentation, i.e. tab-size. If you disagree, reconfigure the browser.

I don't see a big problem with the concept.

Received on Monday, 26 March 2007 20:44:23 UTC