-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set default tab-size to 4 #461
Comments
That would be really helpful and useful. Most modern editors have the default tab width set to 4. Internet Explorer (current?) does not support Perhaps it could be applied to Finally, you need to also include :root {
-moz-tab-size: 4; /* Mozilla Firefox 4+ */
-o-tab-size: 4; /* Opera 10.60 – 15 */
tab-size: 4; /* Chrome 21+, Opera 15+, and Safari 6.1+ */
}
*, *::before, *::after {
-moz-tab-size: inherit;
-o-tab-size: inherit;
tab-size: inherit;
} |
Ah yeah, targeting |
Wasn't aware that tab-size *still* isn't supported in Firefox until it'd been mentioned in a GitHub issue I filed (necolas/normalize.css#461).
@Alhadis What I suggested would make tabs 4 spaces wide across the whole document. The only advantage is that it allows overriding on a node and its descendants, like this: #some-plugin-which-relies-on-8-space-tabs {
-moz-tab-size: 8;
-o-tab-size: 8;
tab-size: 8;
} That way, we can easily override it for any element tree (and it also applies to |
Oh, by "universal", I mean "applied to every single element", not just inherited in the usual cascading order. |
This is a great idea. Since it’s an opinionated default, I’ve moved the discussion to csstools/sanitize.css#60 I’d like to keep browser difference fixes in Normalize.css and opinionated defaults (like box-sizing: border-box or tab-size: 4) in Sanitize.css or the component libraries of your choice. |
Right, let's face it: the default tab-width of 8 characters used by systems and terminals really doesn't cut it for the web.
When code's indented with hard tabs, they're almost always 4-characters wide, not 8. Maybe have a global stylesheet rule to set the tab-size to a sensible value?
The text was updated successfully, but these errors were encountered: