105 posts
  • Exclusive Author
  • Bulgaria
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Has been a member for 4-5 years
DodoWeb says

Just wondering what’s your favourite tab size for HTML /PHP/CSS files?

I used to do it with 4 spaces in the past, but recently I noticed that most of the themes here are using 8 (even the twentyeleven theme). Is there some kind of standard for that?

Back in the days I remember that most of the programmers were using 8 spaces because of the word “function” which is exactly eight-character. However, I find it a bit strange to use 8-space-tab for indenting CSS files for example… How do you do it?

Niki / DodoWeb

894 posts
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Grew a moustache for the Envato Movember competition
infuse01 says

I’m using 4 Spaces. I tried 2 Spaces some days ago but I couldn’t adapt to it – looks to stuffy. I stay with 4 Spaces :)

1081 posts
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Envato Studio (Microlancer) Beta Tester
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Referred between 50 and 99 users
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
+1 more
Smartik says

I use 4 spaces – Notepad++ default.

105 posts
  • Exclusive Author
  • Bulgaria
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Has been a member for 4-5 years
DodoWeb says

4 spaces still looks fine for me, but I really wonder if there’s some kind of standard.. for WP theme-ing or in general.

60 posts Talk less do more!
  • Elite Author
  • Exclusive Author
  • Has been a member for 2-3 years
  • Sold between 50 000 and 100 000 dollars
  • Bought between 50 and 99 items
  • Referred between 10 and 49 users
  • Indonesia
Rifki says

4 space or 1 hard tab more comfortable for me.

@DodoWeb

but I really wonder if there’s some kind of standard.. for WP theme-ing or in general.
http://blog.logtalk.org/2011/03/coding-guidelines-and-the-spaces-versus-tabs-holy-war/ http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#whitespace-1 http://lxr.linux.no/linux/Documentation/CodingStyle
1579 posts Chris Robinson
  • United States
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Has been a member for 5-6 years
  • Author had a File in an Envato Bundle
  • Referred between 500 and 999 users
  • Author had a Free File of the Month
+5 more
contempoinc says

Four spaces is pretty much the standard.

105 posts
  • Exclusive Author
  • Bulgaria
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Has been a member for 4-5 years
DodoWeb says

Still bothers me why the WP guys (as well as many authors here) use 8-space tabs… They really don’t look sexy in CSS and HTML files.

631 posts
  • United Kingdom
  • Sold between 10 000 and 50 000 dollars
  • Most Wanted Bounty Winner
  • Interviewed on the Envato Notes blog
  • Referred between 50 and 99 users
  • Bought between 100 and 499 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Has been a member for 2-3 years
+1 more
UBLThemes says

4 spaces in php, html but it css i use only 2, dont ask me why ;p

just habit :)

326 posts
  • Sold between 10 000 and 50 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Referred between 100 and 199 users
  • Bought between 50 and 99 items
  • Has been a member for 3-4 years
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
  • Portugal
vtimbuc says

I don’t use spaces, I like using tabs with the same size as 4 spaces. If you use tabs and see the source code in the browser it looks like it’s 8 spaces. Maybe that is why you’re seeing so many themes that look like have 8 spaces, when they don’t :)

105 posts
  • Exclusive Author
  • Bulgaria
  • Sold between 5 000 and 10 000 dollars
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Has been a member for 4-5 years
DodoWeb says

I also use tabs with that size, but I’m referring to the source code, not the generated HTML .

However, I just found that my editor (NetBeans) were expanding tabs to spaces by default.. so there we go.

by
by
by
by
by
by