This would be a suggestion for the CSS WG but I’m not on that mailing list and before I bother registering and submitting there — tried in the past, failed, I guess must be doing this thing very wrong —, I thought I’d ask for feedback here.
CSS Text Module specifies tab-size with an initial value of 8 (eight). Indeed most if not all browsers seem to render tabulation characters with the width of 8 space characters.
Today, this doesn’t make much sense. The web author reaction to tab-is-eight-spaces is generally WHOA THAT’S WAY TO BIG WHAT HAPPENED?!?
I propose changing the specified initial value to 4.
That seems to be the contemporary de facto standard, the value that most people expect.
tab-size:4 initial value would be closer to the expectations of both authors and users (wild guess, I know). That would map more closely to the default values used in most code editors, including browser devtools;
- Chrome devtools:
tab-size:4 in “Edit as HTML” (and more).
- Firefox devtools:
-moz-tab-size:4 in “Edit as HTML” (and more).
2 is also a common value, but is more like a personal preference that some people use in their code editor of choice.
- Web authors would display code and other types of tab-indented text in
<pre> elements without having to convert tab characters to either 2 or 4 spaces because WHOA THAT’S WAY TO BIG WHAT HAPPENED? That would make use of author-specified
tab-size optional, rather than mandatory.
- View-source views in browsers would be more reasonably indented.
- Breaking some ASCII art that uses tab characters and relies on tab-is-8-spaces.