This option controls how the source maps that Sass generates link back to the Sass files that contributed to the generated CSS. $ sass -no-source-map style.scss style.css If the -no-source-map flag is passed, Sass won’t generate any source maps. it cannot be passed along with other source map options. See instructions for using source maps in Chrome and Firefox.ĭart Sass generates source maps by default for every CSS file it emits. They make it possible to see and even edit your Sass files in browsers. Source maps are files that tell browsers or other tools that consume CSS how that CSS corresponds to the Sass files from which it was generated.
$ sass -error-css style.scss style.cssįont-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",Ĭontent: "Error: Incompatible units em and px.\a \2577 \a 1 \2502 $width: 15px + 2em \a \2502 ^^^^^^^^^^\a \2575 \a test.scss 1:9 root stylesheet" When it’s disabled, the -update flag and -watch flag will delete CSS files instead when an error occurs. You can pass -error-css explicitly to enable it even when you’re compiling to standard out, or -no-error-css to disable it everywhere. This CSS file describes the error in a comment and in the content property of body::before, so that you can see the error message in the browser without needing to switch back to the terminal.īy default, error CSS is enabled if you’re compiling to at least one file on disk (as opposed to standard output). This flag tells Sass whether to emit a CSS file when an error occurs during compilation.
The inverse, -no-indented, can be used to force all input files to be parsed as SCSS instead. If it’s used in many-to-many mode, all input files are parsed as the indented syntax, although files they use will have their syntax determined as usual. This flag tells Sass to parse the input file as the indented syntax. The -stdin flag may not be used with many-to-many mode. When it’s passed, no input file may be passed. This flag is an alternative way of telling Sass that it should read its input file from standard input. These options control how Sass loads its input files and how it produces output files. Options Options Input and Output Input and Output You can use partials to separate out your stylesheets without creating a bunch of unnecessary output files. When compiling whole directories, Sass will ignore partial files whose names begin with _. # Compiles all Sass files in themes/ to CSS files in public/css/. $ sass light.scss:light.css dark.scss:dark.css # Compiles light.scss and dark.scss to light.css and dark.css. It can also compile all Sass files in a directory to CSS files with the same names in another directory. The inputs are separated from the outputs with colons. Many-to-many mode compiles one or more input files to one or more output files.