Sass @error DirectiveSass @error directive is used when you want to display errors. It displays the SassScript expression values as fatal error including a nice stack trace. Sass @error Directive ExampleLet's create a SCSS file named "error.scss", having the following data. Now, open command prompt and run the watch command to tell SASS to watch the file and update the CSS whenever SASS file is changed. Execute the following code: sass --watch error.scss:error.css It will create a normal CSS file named "error.css" in the same directory automatically. ![]() Output: ![]()
Next TopicSass Control Directives & Expressions
|