You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -245,7 +245,8 @@ See the [CLI documentation](https://github.com/angular/angular-cli/wiki/stories-
245
245
246
246
### Non-CSS style files
247
247
248
-
You can write style files in [sass](http://sass-lang.com/), [less](http://lesscss.org/), or [stylus](http://stylus-lang.com/) and specify those files in the `styleUrls` metadata, e.g.,
248
+
If you're building with the CLI,
249
+
you can write style files in [sass](http://sass-lang.com/), [less](http://lesscss.org/), or [stylus](http://stylus-lang.com/) and specify those files in the `@Component.styleUrls` metadata with the appropriate extensions (`.scss`, `.less`, `.styl`) as in the following example:
249
250
250
251
<code-example>
251
252
@Component({
@@ -256,10 +257,18 @@ You can write style files in [sass](http://sass-lang.com/), [less](http://lesscs
256
257
...
257
258
</code-example>
258
259
259
-
The CLI build process runs the corresponding CSS pre-processors.
260
+
The CLI build process runs the pertinent CSS preprocessor.
260
261
261
-
You can also configure the CLI to default to your preferred CSS pre-processer
262
-
as explained in the [CLI documentation](https://github.com/angular/angular-cli/wiki/stories-css-preprocessors).
262
+
When generating a component file with `ng generate component`, the CLI emits an empty CSS styles file (`.css`) by default.
263
+
You can configure the CLI to default to your preferred CSS preprocessor
264
+
as explained in the [CLI documentation](https://github.com/angular/angular-cli/wiki/stories-css-preprocessors
265
+
"CSS Preprocessor integration").
266
+
267
+
<divclass="alert is-important">
268
+
269
+
Style strings added to the `@Component.styles` array _must be written in CSS_ because the CLI cannot apply a preprocessor to inline styles.
0 commit comments