I have this in my main.sass:
#thing
{
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
When compiling, sass says:
Inconsistent indentation: 7 spaces were used for indentation,
but the rest of the document was indented using 4 spaces.
Is there a way to suppress this?
The Indented Syntax The indented syntax was Sass’s original syntax, and so it uses the file extension.sass. Because of this extension, it’s sometimes just called “Sass”. The indented syntax supports all the same features as SCSS, but it uses indentation instead of curly braces and semicolons to describe the format of the document.
Because of its similarity to CSS, it’s the easiest syntax to get used to and the most popular. The indented syntax was Sass’s original syntax, and so it uses the file extension .sass. Because of this extension, it’s sometimes just called “Sass”.
Different implementations of Sass have different interfaces when using them from the command line: Dart Sass has the same command-line interface no matter how you install it. Ruby Sass is deprecated, and we recommend you move to a different implementation.
The indented syntax supports all the same features as SCSS, but it uses indentation instead of curly braces and semicolons to describe the format of the document. In general, any time you’d write curly braces in CSS or SCSS, you can just indent one level deeper in the indented syntax.
UPDATE: Seeing that you've included the curly braces in your question, I suggest that you try changing the file's extension from .sass
to .scss
. SCSS will probably ignore your indentation because it can tell which part goes where based on the curly braces.
SASS relies on indentation to tell where you're trying to apply your CSS, so it won't be able to validate it if it varies in every line. Try this instead:
.something
-webkit-box-sizing: border-box
-moz-box-sizing: border-box
box-sizing: border-box
Personally, I wouldn't even bother indenting border-box
to make them all start at the same column, because it's too much work for too little gain. As an alternative, you could write a mixin to do it for you:
@mixin border-box
-webkit-box-sizing: border-box
-moz-box-sizing: border-box
box-sizing: border-box
After defining it, you can include it directly:
.something
@include border-box
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With