2018-10-26 01:46:08 +02:00
|
|
|
|
---
|
|
|
|
|
title: Dart Sass Command-Line Interface
|
2018-11-30 00:43:18 +01:00
|
|
|
|
table_of_contents: true
|
2018-10-26 01:46:08 +02:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
The Dart Sass executable can be invoked in one of two modes.
|
|
|
|
|
|
|
|
|
|
### One-to-One Mode
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
sass <input.scss> [output.css]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
One-to-one mode compiles a single input file (`input.scss`) to a single output
|
|
|
|
|
location (`output.css`). If no output location is passed, the compiled CSS is
|
|
|
|
|
printed to the terminal.
|
|
|
|
|
|
|
|
|
|
The input file is parsed as [SCSS][] if its extension is `.scss`, as the
|
|
|
|
|
[indented syntax][] if its extension is `.sass`, or as [plain CSS][] if its
|
2018-10-27 00:04:43 +02:00
|
|
|
|
extension is `.css`. If it doesn't have one of these three extensions, or if it
|
|
|
|
|
comes from standard input, it's parsed as SCSS by default. This can be
|
|
|
|
|
controlled with the [`--indented` flag][].
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
[SCSS]: ../syntax#scss
|
|
|
|
|
[indented syntax]: ../syntax#the-indented-syntax
|
|
|
|
|
[plain CSS]: ../at-rules/import#importing-css
|
|
|
|
|
[`--indented` flag]: #indented
|
|
|
|
|
|
|
|
|
|
The special string `-` can be passed in place of the input file to tell Sass to
|
|
|
|
|
read the input file from [standard input][]. Sass will default to parsing it as
|
2018-10-27 00:04:43 +02:00
|
|
|
|
SCSS unless the [`--indented` flag][] is passed.
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
[standard input]: https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)
|
|
|
|
|
|
|
|
|
|
### Many-to-many Mode
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.4.0' %>
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
```
|
2018-10-27 00:04:43 +02:00
|
|
|
|
sass [<input.css>:<output.css>] [<input/>:<output/>]...
|
2018-10-26 01:46:08 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Many-to-many mode compiles one or more input files to one or more output files.
|
|
|
|
|
The inputs are separated from the outputs with colons. It can also compile all
|
|
|
|
|
Sass files in a directory to CSS files with the same names in another directory.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
2018-11-30 01:04:00 +01:00
|
|
|
|
# Compiles style.scss to style.css.
|
2018-10-26 01:46:08 +02:00
|
|
|
|
$ sass style.scss:style.css
|
|
|
|
|
|
2018-11-30 01:04:00 +01:00
|
|
|
|
# Compiles light.scss and dark.scss to light.css and dark.css.
|
2018-10-26 01:46:08 +02:00
|
|
|
|
$ sass light.scss:light.css dark.scss:dark.css
|
|
|
|
|
|
2018-11-30 01:04:00 +01:00
|
|
|
|
# Compiles all Sass files in themes/ to CSS files in public/css/.
|
2018-10-26 01:46:08 +02:00
|
|
|
|
$ sass themes:public/css
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
When compiling whole directories, Sass will ignore [partial files][] whose names
|
|
|
|
|
begin with `_`. You can use partials to separate out your stylesheets without
|
|
|
|
|
creating a bunch of unnecessary output files.
|
|
|
|
|
|
|
|
|
|
[partial files]: ../at-rules/import#partials
|
|
|
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
|
|
### Input and Output
|
|
|
|
|
|
|
|
|
|
These options control how Sass loads its input files and how it produces output
|
|
|
|
|
files.
|
|
|
|
|
|
|
|
|
|
#### `--stdin`
|
|
|
|
|
|
|
|
|
|
This flag is an alternative way of telling Sass that it should read its input
|
|
|
|
|
file from [standard input][]. When it's passed, no input file may be passed.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ echo "h1 {font-size: 40px}" | sass --stdin h1.css
|
|
|
|
|
$ echo "h1 {font-size: 40px}" | sass --stdin
|
|
|
|
|
h1 {
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The `--stdin` flag may not be used with [many-to-many mode][].
|
|
|
|
|
|
|
|
|
|
[many-to-many mode]: #many-to-many-mode
|
|
|
|
|
|
|
|
|
|
#### `--indented`
|
|
|
|
|
|
|
|
|
|
This flag tells Sass to parse the input file as the [indented syntax][]. If it's
|
|
|
|
|
used in [many-to-many mode][], all input files are parsed as the indented
|
2019-08-30 00:31:29 +02:00
|
|
|
|
syntax, although files they [use][] will have their syntax determined as usual.
|
|
|
|
|
The inverse, `--no-indented`, can be used to force all input files to be parsed
|
|
|
|
|
as [SCSS][] instead.
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
2019-08-30 00:31:29 +02:00
|
|
|
|
[use]: ../at-rules/use
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
The `--indented` flag is mostly useful when the input file is coming from
|
|
|
|
|
[standard input][], so its syntax can't be automatically determined.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ echo -e 'h1\n font-size: 40px' | sass --indented -
|
|
|
|
|
h1 {
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--load-path`
|
|
|
|
|
|
|
|
|
|
This option (abbreviated `-I`) adds an additional [load path][] for Sass to look
|
2019-08-30 00:31:29 +02:00
|
|
|
|
for stylesheets. It can be passed multiple times to provide multiple load paths.
|
2018-10-26 01:46:08 +02:00
|
|
|
|
Earlier load paths will take precedence over later ones.
|
|
|
|
|
|
2019-08-30 00:31:29 +02:00
|
|
|
|
[load path]: ../at-rules/use#load-paths
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --load-path=node_modules/bootstrap/dist/css style.scss style.css
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--style`
|
|
|
|
|
|
|
|
|
|
This option (abbreviated `-s`) controls the output style of the resulting CSS.
|
|
|
|
|
Dart Sass supports two output styles:
|
|
|
|
|
|
|
|
|
|
* `expanded` (the default) writes each selector and declaration on its own line.
|
|
|
|
|
* `compressed` removes as many extra characters as possible, and writes the
|
|
|
|
|
entire stylesheet on a single line.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --style=expanded style.scss
|
|
|
|
|
h1 {
|
|
|
|
|
font-size: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$ sass --style=compressed style.scss
|
|
|
|
|
h1{font-size:40px}
|
|
|
|
|
```
|
|
|
|
|
|
2019-04-08 01:39:53 +02:00
|
|
|
|
#### `--no-charset`
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.19.0' %>
|
|
|
|
|
|
2019-04-08 01:39:53 +02:00
|
|
|
|
This flag tells Sass never to emit a `@charset` declaration or a UTF-8
|
|
|
|
|
[byte-order mark][]. By default, or if `--charset` is passed, Sass will insert
|
|
|
|
|
either a `@charset` declaration (in expanded output mode) or a byte-order mark
|
|
|
|
|
(in compressed output mode) if the stylesheet contains any non-ASCII characters.
|
|
|
|
|
|
|
|
|
|
[byte-order mark]: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ echo 'h1::before {content: "👭"}' | sass --no-charset
|
|
|
|
|
h1::before {
|
|
|
|
|
content: "👭";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$ echo 'h1::before {content: "👭"}' | sass --charset
|
|
|
|
|
@charset "UTF-8";
|
|
|
|
|
h1::before {
|
|
|
|
|
content: "👭";
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2019-04-30 20:15:43 +02:00
|
|
|
|
#### `--error-css`
|
|
|
|
|
|
|
|
|
|
<% impl_status dart: '1.20.0' %>
|
|
|
|
|
|
|
|
|
|
This flag tells Sass whether to emit a CSS file when an error occurs during
|
|
|
|
|
compilation. 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.
|
|
|
|
|
|
|
|
|
|
By default, error CSS is enabled if you're compiling to at least one file on
|
|
|
|
|
disk (as opposed to standard output). 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. When it's disabled, the [`--update` flag][] and
|
|
|
|
|
[`--watch` flag][] will delete CSS files instead when an error occurs.
|
|
|
|
|
|
|
|
|
|
[`--watch` flag]: #watch
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --error-css style.scss style.css
|
|
|
|
|
/* Error: Incompatible units em and px.
|
|
|
|
|
* ,
|
|
|
|
|
* 1 | $width: 15px + 2em;
|
|
|
|
|
* | ^^^^^^^^^^
|
|
|
|
|
* '
|
|
|
|
|
* test.scss 1:9 root stylesheet */
|
|
|
|
|
|
|
|
|
|
body::before {
|
|
|
|
|
font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",
|
|
|
|
|
"Droid Sans Mono", monospace, monospace;
|
|
|
|
|
white-space: pre;
|
|
|
|
|
display: block;
|
|
|
|
|
padding: 1em;
|
|
|
|
|
margin-bottom: 1em;
|
|
|
|
|
border-bottom: 2px solid black;
|
|
|
|
|
content: "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";
|
|
|
|
|
}
|
|
|
|
|
Error: Incompatible units em and px.
|
|
|
|
|
╷
|
|
|
|
|
1 │ $width: 15px + 2em;
|
|
|
|
|
│ ^^^^^^^^^^
|
|
|
|
|
╵
|
|
|
|
|
test.scss 1:9 root stylesheet
|
|
|
|
|
```
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
#### `--update`
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.4.0' %>
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
If the `--update` flag is passed, Sass will only compile stylesheets whose
|
|
|
|
|
dependencies have been modified more recently than the corresponding CSS file
|
|
|
|
|
was generated. It will also print status messages when updating stylesheets.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --update themes:public/css
|
|
|
|
|
Compiled themes/light.scss to public/css/light.css.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Source Maps
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.3.0' %>
|
|
|
|
|
|
2018-11-01 00:02:04 +01:00
|
|
|
|
<%= partial 'documentation/snippets/source-maps' %>
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
Dart Sass generates source maps by default for every CSS file it emits.
|
|
|
|
|
|
|
|
|
|
#### `--no-source-map`
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --no-source-map style.scss style.css
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--source-map-urls`
|
|
|
|
|
|
|
|
|
|
This option controls how the source maps that Sass generates link back to the
|
|
|
|
|
Sass files that contributed to the generated CSS. Dart Sass supports two types
|
|
|
|
|
of URLs:
|
|
|
|
|
|
|
|
|
|
* `relative` (the default) uses relative URLs from the location of the source
|
|
|
|
|
map file to the locations of the Sass source file.
|
|
|
|
|
* `absolute` uses the absolute [`file:` URLs][] of the Sass source files. Note
|
|
|
|
|
that absolute URLs will only work on the same computer that the CSS was
|
|
|
|
|
compiled.
|
|
|
|
|
|
|
|
|
|
[`file:` URLs]: https://en.wikipedia.org/wiki/File_URI_scheme
|
|
|
|
|
|
|
|
|
|
```shellsession
|
2018-11-30 01:04:00 +01:00
|
|
|
|
# Generates a URL like "../sass/style.scss".
|
2018-10-26 01:46:08 +02:00
|
|
|
|
$ sass --source-map-urls=relative sass/style.scss css/style.css
|
|
|
|
|
|
2018-11-30 01:04:00 +01:00
|
|
|
|
# Generates a URL like "file:///home/style-wiz/sassy-app/sass/style.scss".
|
2018-10-26 01:46:08 +02:00
|
|
|
|
$ sass --source-map-urls=absolute sass/style.scss css/style.css
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--embed-sources`
|
|
|
|
|
|
|
|
|
|
This flag tells Sass to embed the entire contents of the Sass files that
|
|
|
|
|
contributed to the generated CSS in the source map. This may produce very large
|
|
|
|
|
source maps, but it guarantees that the source will be available on any computer
|
|
|
|
|
no matter how the CSS is served.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --embed-sources sass/style.scss css.style.css
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--embed-source-map`
|
|
|
|
|
|
|
|
|
|
This flag tells Sass to embed the contents of the source map file in the
|
|
|
|
|
generated CSS, rather than creating a separate file and linking to it from the
|
|
|
|
|
CSS.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --embed-source-map sass/style.scss css.style.css
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Other Options
|
|
|
|
|
|
|
|
|
|
#### `--watch`
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.6.0' %>
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
This flag acts like the [`--update` flag][], but after the first round
|
|
|
|
|
compilation is done Sass stays open and continues compiling stylesheets whenever
|
|
|
|
|
they or their dependencies change.
|
|
|
|
|
|
|
|
|
|
[`--update` flag]: #update
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --watch themes:public/css
|
|
|
|
|
Compiled themes/light.scss to public/css/light.css.
|
|
|
|
|
|
2018-11-30 01:04:00 +01:00
|
|
|
|
# Then when you edit themes/dark.scss...
|
2018-10-26 01:46:08 +02:00
|
|
|
|
Compiled themes/dark.scss to public/css/dark.css.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--poll`
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.8.0' %>
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
This flag, which may only be passed along with `--watch`, tells Sass to manually
|
|
|
|
|
check for changes to the source files every so often instead of relying on the
|
|
|
|
|
operating system to notify it when something changes. This may be necessary if
|
|
|
|
|
you're editing Sass on a remote drive where the operating system's notification
|
|
|
|
|
system doesn't work.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --watch --poll themes:public/css
|
|
|
|
|
Compiled themes/light.scss to public/css/light.css.
|
|
|
|
|
|
2018-11-30 01:04:00 +01:00
|
|
|
|
# Then when you edit themes/dark.scss...
|
2018-10-26 01:46:08 +02:00
|
|
|
|
Compiled themes/dark.scss to public/css/dark.css.
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--stop-on-error`
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.8.0' %>
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
This flag tells Sass to stop compiling immediately when an error is detected,
|
|
|
|
|
rather than trying to compile other Sass files that may not contain errors. It's
|
|
|
|
|
mostly useful in [many-to-many mode][].
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --stop-on-error themes:public/css
|
|
|
|
|
Error: Expected expression.
|
2019-04-08 02:01:48 +02:00
|
|
|
|
╷
|
|
|
|
|
42 │ h1 {font-face: }
|
|
|
|
|
│ ^
|
|
|
|
|
╵
|
2018-10-26 01:46:08 +02:00
|
|
|
|
themes/light.scss 42:16 root stylesheet
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--interactive`
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.5.0' %>
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
This flag (abbreviated `-i`) tells Sass to run in interactive mode, where you
|
|
|
|
|
can write [SassScript expressions][] and see their results. Interactive mode
|
2019-09-03 01:32:14 +02:00
|
|
|
|
also supports [variables][] and [`@use` rules][].
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
[SassScript expressions]: ../syntax/structure#expressions
|
|
|
|
|
[variables]: ../variables
|
2019-09-03 01:32:14 +02:00
|
|
|
|
[`@use` rules]: ../at-rules/use
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --interactive
|
|
|
|
|
>> 1px + 1in
|
|
|
|
|
97px
|
2019-09-03 01:32:14 +02:00
|
|
|
|
>> @use "sass:map"
|
2018-10-26 01:46:08 +02:00
|
|
|
|
>> $map: ("width": 100px, "height": 70px)
|
|
|
|
|
("width": 100px, "height": 70px)
|
2019-09-03 01:32:14 +02:00
|
|
|
|
>> map.get($map, "width")
|
2018-10-26 01:46:08 +02:00
|
|
|
|
100px
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--color`
|
|
|
|
|
|
|
|
|
|
This flag (abbreviated `-c`) tells Sass to emit [terminal colors][], and the
|
|
|
|
|
inverse `--no-color` tells it not to emit colors. By default, it will emit
|
|
|
|
|
colors if it looks like it's being run on a terminal that supports them.
|
|
|
|
|
|
|
|
|
|
[terminal colors]: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
|
|
|
|
|
|
2019-04-08 02:01:48 +02:00
|
|
|
|
<pre class="highlight plaintext"><code>$ sass --color style.scss style.css
|
2018-10-26 01:46:08 +02:00
|
|
|
|
Error: Incompatible units em and px.
|
2019-04-08 02:01:48 +02:00
|
|
|
|
<span style="color: blue">╷</span>
|
2019-12-18 04:48:53 +01:00
|
|
|
|
<span style="color: blue">1 │</span> $width: <span style="color: crimson">15px + 2em</span>
|
|
|
|
|
<span style="color: blue">│</span> <span style="color: crimson">^^^^^^^^^^</span>
|
2019-04-08 02:01:48 +02:00
|
|
|
|
<span style="color: blue">╵</span>
|
2018-10-26 01:46:08 +02:00
|
|
|
|
style.scss 1:9 root stylesheet
|
|
|
|
|
|
|
|
|
|
$ sass --no-color style.scss style.css
|
|
|
|
|
Error: Incompatible units em and px.
|
2019-04-08 02:01:48 +02:00
|
|
|
|
╷
|
|
|
|
|
1 │ $width: 15px + 2em
|
|
|
|
|
│ ^^^^^^^^^^
|
|
|
|
|
╵
|
2018-10-26 01:46:08 +02:00
|
|
|
|
style.scss 1:9 root stylesheet</code></pre>
|
|
|
|
|
|
2019-04-08 01:43:49 +02:00
|
|
|
|
#### `--no-unicode`
|
|
|
|
|
|
2019-04-30 20:05:53 +02:00
|
|
|
|
<% impl_status dart: '1.17.0' %>
|
|
|
|
|
|
2019-04-08 01:43:49 +02:00
|
|
|
|
This flag tells Sass only to emit ASCII characters to the terminal as part of
|
2019-04-08 02:01:48 +02:00
|
|
|
|
error messages. By default, or if `--unicode` is passed, Sass will emit non-ASCII
|
|
|
|
|
characters for these messages. This flag does not affect the CSS output.
|
2019-04-08 01:43:49 +02:00
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --no-unicode style.scss style.css
|
|
|
|
|
Error: Incompatible units em and px.
|
|
|
|
|
,
|
|
|
|
|
1 | $width: 15px + 2em;
|
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
'
|
|
|
|
|
test.scss 1:9 root stylesheet
|
|
|
|
|
|
|
|
|
|
$ sass --unicode style.scss style.css
|
|
|
|
|
Error: Incompatible units em and px.
|
|
|
|
|
╷
|
|
|
|
|
1 │ $width: 15px + 2em;
|
|
|
|
|
│ ^^^^^^^^^^
|
|
|
|
|
╵
|
|
|
|
|
test.scss 1:9 root stylesheet
|
|
|
|
|
```
|
|
|
|
|
|
2018-10-26 01:46:08 +02:00
|
|
|
|
#### `--quiet`
|
|
|
|
|
|
|
|
|
|
This flag (abbreviated `-q`) tells Sass not to emit any warnings when compiling.
|
|
|
|
|
By default, Sass emits warnings when deprecated features are used or when the
|
|
|
|
|
[`@warn` rule][] is encountered. It also silences the [`@debug` rule][].
|
|
|
|
|
|
|
|
|
|
[`@warn` rule]: ../at-rules/warn
|
|
|
|
|
[`@debug` rule]: ../at-rules/debug
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --quiet style.scss style.css
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--trace`
|
|
|
|
|
|
|
|
|
|
This flag tells Sass to print the full Dart or JavaScript stack trace when an
|
|
|
|
|
error is encountered. It's used by the Sass team for debugging errors.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --trace style.scss style.css
|
|
|
|
|
Error: Expected expression.
|
2019-04-08 02:01:48 +02:00
|
|
|
|
╷
|
|
|
|
|
42 │ h1 {font-face: }
|
|
|
|
|
│ ^
|
|
|
|
|
╵
|
2018-10-26 01:46:08 +02:00
|
|
|
|
themes/light.scss 42:16 root stylesheet
|
|
|
|
|
|
|
|
|
|
package:sass/src/visitor/evaluate.dart 1846:7 _EvaluateVisitor._addExceptionSpan
|
|
|
|
|
package:sass/src/visitor/evaluate.dart 1128:12 _EvaluateVisitor.visitBinaryOperationExpression
|
|
|
|
|
package:sass/src/ast/sass/expression/binary_operation.dart 39:15 BinaryOperationExpression.accept
|
|
|
|
|
package:sass/src/visitor/evaluate.dart 1097:25 _EvaluateVisitor.visitVariableDeclaration
|
|
|
|
|
package:sass/src/ast/sass/statement/variable_declaration.dart 50:15 VariableDeclaration.accept
|
|
|
|
|
package:sass/src/visitor/evaluate.dart 335:13 _EvaluateVisitor.visitStylesheet
|
|
|
|
|
package:sass/src/visitor/evaluate.dart 323:5 _EvaluateVisitor.run
|
|
|
|
|
package:sass/src/visitor/evaluate.dart 81:10 evaluate
|
|
|
|
|
package:sass/src/executable/compile_stylesheet.dart 59:9 compileStylesheet
|
|
|
|
|
package:sass/src/executable.dart 62:15 main
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--help`
|
|
|
|
|
|
2018-10-27 00:04:43 +02:00
|
|
|
|
This flag (abbreviated `-h`) prints a summary of this documentation.
|
2018-10-26 01:46:08 +02:00
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --help
|
|
|
|
|
Compile Sass to CSS.
|
|
|
|
|
|
|
|
|
|
Usage: sass <input.scss> [output.css]
|
|
|
|
|
sass <input.scss>:<output.css> <input/>:<output/>
|
|
|
|
|
|
|
|
|
|
...
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### `--version`
|
|
|
|
|
|
|
|
|
|
This flag prints the current version of Sass.
|
|
|
|
|
|
|
|
|
|
```shellsession
|
|
|
|
|
$ sass --version
|
|
|
|
|
<%= impl_version(:dart) %>
|
|
|
|
|
```
|