For Angular 6 check the Official documentation

Note: For @angular/cli versions older than 6.0.0-beta.6 use ng set in place of ng config.

For existing projects

In an existing angular-cli project that was set up with the default css styles you will need to do a few things:

  1. Change the default style extension to scss

Manually change in .angular-cli.json (Angular 5.x and older) or angular.json (Angular 6+) or run:

ng config defaults.styleExt=scss

if you get an error: Value cannot be found. use the command:

ng config schematics.@schematics/angular:component.styleext scss

(*source: Angular CLI SASS options)

  1. Rename your existing .css files to .scss (i.e. styles.css and app/app.component.css)

  2. Point the CLI to find styles.scss

Manually change the file extensions in apps[0].styles in angular.json

  1. Point the components to find your new style files

Change the styleUrls in your components to match your new file names

For future projects

As @Serginho mentioned you can set the style extension when running the ng new command

ng new your-project-name --style=scss

If you want to set the default for all projects you create in the future run the following command:

ng config --global defaults.styleExt=scss
Answer from Chic on Stack Overflow
🌐
npm
npmjs.com › package › schematics-scss-migrate
schematics-scss-migrate - npm
March 25, 2023 - In your Angular CLI project, run ng g schematics-scss-migrate:scss-migrate. This will do the following in the consuming project: Rename all the stylesheets in the src folder recursively · Alter the styleUrls in respective component classes ...
      » npm install schematics-scss-migrate
    
Published   Mar 25, 2023
Version   2.3.17
Author   Thabo Ambrose
Discussions

How to add scss in an existing angular project - Stack Overflow
I tried different way but not get ... , How to change css to scss in existing angular project. ... Sign up to request clarification or add additional context in comments. ... your answer is fine, that is the reason I DO NOT vote you down. The problem is the script. Only works for the half of the scripts. 2022-07-18T13:03:43.6... More on stackoverflow.com
🌐 stackoverflow.com
Angular generates css instead of scss in library
🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug wa... More on github.com
🌐 github.com
5
January 10, 2022
I have configured my project with scss . now I want to use css in my project.how can I do this
Just write CSS, it supports both. More on reddit.com
🌐 r/Angular2
3
0
January 18, 2023
Is it possible to have both css and scss in Angular - Stack Overflow
I am including a stand-alone build module which uses .scss (SASS) into an existing Angular app set up with plain CSS. Is it possible to have these both next to each other and does it need any custom More on stackoverflow.com
🌐 stackoverflow.com
🌐
Plain English
plainenglish.io › blog › step-by-step-guide-to-upgrade-your-angular-app-from-css-to-scss
Step by Step Guide to Upgrade Angular App From CSS to SCSS
In this post, we will guide you through upgrading your Angular app from the default CSS styling format to SCSS in a step-by-step manner.
🌐
Medium
medium.com › motf-creations › migrate-from-css-to-scss-stylesheets-for-existing-angular-application-d61f8061f5b7
Migrate from CSS to SCSS stylesheets for an existing Angular application | by Thabo | Motf Creations | Medium
October 8, 2021 - Now that we have achieved that, ... for any file with the .component.css reference using the shortcut Ctrl + Shift + f and replace all with Ctrl + Shift + h....
🌐
Angular.love
angular.love › migrate-from-css-to-scss-stylesheets-for-an-existing-angular-project
Migrate from CSS to SCSS in existing Angular project
Now that we have achieved that, ... globally for any file with the .component.css reference using the shortcut Ctrl + Shift + f and replace all with Ctrl + Shift + h....
Find elsewhere
🌐
Medium
frontendinterviewquestions.medium.com › how-to-change-css-to-scss-in-angular-ea9e51e58aa8
How to change CSS to SCSS in Angular ? | by Pravin M | Medium
October 13, 2024 - The --style=scss flag configures the project to use SCSS instead of the default CSS. If you already have an existing Angular project using CSS, you can still convert it to SCSS by following the subsequent steps.
🌐
DigitalOcean
digitalocean.com › community › tutorials › using-sass-with-the-angular-cli
Using Sass with the Angular CLI | DigitalOcean
September 15, 2020 - If you’ve already created your Angular CLI app with the default .css files, it will take a bit more work to convert it over. You can tell Angular to start processing Sass files with the following command: ... This will go ahead and tell the Angular CLI to start processing .scss files.
🌐
Cookbook
tangoslee.github.io › cookbook › 2018 › 09 › 30 › change-default-style-from-css-to-scss-in-angular
Change Default Style From CSS to SCSS in Angular | Cookbook
September 30, 2018 - New project1ng new project --style=scss Existing project1ng config schematics.@schematics/angular:component.styleext scss Edit .css to .scss in angular.json 12"styles": [ "src/styles.scss", Referen
🌐
Medium
paperinflames.medium.com › css-to-scss-migration-in-an-existing-project-98a8ad5c273a
CSS to SCSS migration in 1 min for existing project - PaperInFlames - Medium
December 11, 2024 - I will help you migrate an existing complex/simple project’s stylesheets from CSS to SCSS with minimal manual effort. ... Open Command Prompt in your project location(the folder where you’ve package.json file). Run the below command. ... That’s it! All the below things will be handled automatically. Addition of SCSS styles schematics to Angular.json file
🌐
Medium
neowei.medium.com › step-by-step-guide-to-upgrade-your-angular-app-from-css-to-scss-fb347330fe28
Step by Step Guide to Upgrade Angular App From CSS to SCSS | by Neo Liu | Medium
April 14, 2023 - Step by Step Guide to Upgrade Angular App From CSS to SCSS Creating an Angular app via Angular CLI allows you to select the stylesheet format among CSS (default), SCSS, SASS, LESS and Stylus. SASS is …
🌐
GeeksforGeeks
geeksforgeeks.org › css › how-do-you-create-application-to-use-scss
Create Angular Application with SCSS - GeeksforGeeks
February 9, 2025 - Create a new file with the .scss extension in the src/styles directory (or any other directory that you specified in the stylePreprocessorOptions property in the angular.json file).
🌐
GitHub
github.com › angular › angular-cli › issues › 22458
Angular generates css instead of scss in library · Issue #22458 · angular/angular-cli
January 10, 2022 - animations, common, compiler, ... ng-packagr 13.1.2 rxjs 7.4.0 typescript 4.5.4 · Current workaround using --style=scss in the generate command will create a scss file in the component....
Author   PascalMainzer
🌐
Reddit
reddit.com › r/angular2 › i have configured my project with scss . now i want to use css in my project.how can i do this
r/Angular2 on Reddit: I have configured my project with scss . now I want to use css in my project.how can I do this
January 18, 2023 - Angular is Google's open source framework for crafting high-quality front-end web applications. r/Angular2 exists to help spread news, discuss current developments and help solve problems. Welcome! ... Just write CSS, it supports both.
Top answer
1 of 3
8

EDIT for Angular 6+

Found on GitHub page of Angular:

stylePreprocessorOptions is still supported. You will have to manually update the newly generated angular.json though. Its new place is inside the "options" block of the json.

An example config could look like this:

"options": {
    "outputPath": "../webapp",
    "index": "src/index.html",
    "main": "src/main.ts",
    "tsConfig": "src/tsconfig.app.json",
    "polyfills": "src/polyfills.ts",
    "assets": [
        {
            "glob": "**/*",
            "input": "src/resources",
            "output": "/resources"
        },
    ],
    "styles": [
        "src/styles.scss"
    ],
    "stylePreprocessorOptions": {
        "includePaths": [
            "src/styles"
        ]
    },
    "scripts": []
}

Note the changed path.

ORIGINAL answer

Actually it just went fine out-of-the-box by having the "styleExt" set to "css". A bunch of components in a specific module were using SASS. I have a sass folder with variables and mixins and this setting in angular-cli.json was needed to have these scss files compiled / processed correctly:

"stylePreprocessorOptions": {
  "includePaths": [
    "sass"
  ]
}

The application renders fine with a mix of css and scss files. I assume this styleExt parameter is just there for the default component style (css, scss, less) file generation when adding components via angular-cli commands.

2 of 3
6

You can have both but you have to set your style extension to SASS or CSS only.

Now of if you want to use CSS or SASS in your component just use Angular CLI to generate component like

For CSS

ng g component my-component --style=css

For SASS

ng g component my-component --style=sass

So set style extension to SASS and use CSS extensions also in your project

🌐
Testmu
testmu.ai › home › free tools › css to scss converter online
CSS to SCSS Online Converter | TestMu AI
In your terminal, type "sass input.scss output.css". ... In Angular, you may convert CSS to SCSS by renaming your CSS files with the.scss extension and modifying the style URLs of your components to point to the new SCSS files.
🌐
Davidemanske
davidemanske.com › add-scss-support-to-angular-project
Add SCSS support to Angular Project
July 1, 2022 - David Manske — Digital Pioneer, Inventor, and Charismatic Leader. VP of Digital Strategy and Data at Generac Power Systems.
🌐
DEV Community
dev.to › stefaniefluin › how-to-structure-scss-in-an-angular-app-3376
How to Structure SCSS in an Angular App - DEV Community
April 14, 2023 - If you're a lover of SCSS, you'll definitely want to make sure to use it in your Angular applications. Luckily the Angular CLI does all the setup for you! Let's first walk through the file changes that the Angular CLI handles for us and how you can modify existing projects to switch over to SCSS for styling.