Reputation: 593
I’m working with Dart 2 and AngularDart 5.
⚠ I searched online about my question, but I didn’t find a satisfactory answer.
❔ Can somebody explain all the steps I need to include and to work with SCSS style files within my AngularDart application?
I started with quickstart application that you can find here.
Thank you!
Upvotes: 7
Views: 2839
Reputation: 11
With newest versions:
Surprise: In styleUrls
are in a different CSS filename (not with the .scss.css
extension, just .css
; e.g. app_component.css
, but the styles are in app_component.scss
).
Surprise: In app_component.scss
, import without lib
in the path:
@import 'package:angular_components/app_layout/mixins';
pub run build_runner serve --verbose
See with package info: https://github.com/dart-lang/angular_components/issues/374#issuecomment-636344237
Upvotes: 1
Reputation: 59
If you are using angluar_components. One could simply turn it on:
Create a build.yaml file with the following content :
targets:
$default:
builders:
angular_components|scss_builder:
enabled: True
styleUrl
annotations:
styleUrls: const ['app_component.scss.css']
*.scss
files.Upvotes: 6
Reputation: 426
sass_builder:
^2.0.0
.pub get
to download the new dependencies. lib/app_component.scss
and add some styles to it.lib/app_component.dart
:
styleUrls: const ['app_component.css'],
The css file will be generated by sass_builder during the build process.
Upvotes: 18