Thursday 19 November 2020

Angular scss Import and use variable from other scss

 

  • The definition of paths depends on your version of Angular. In our project, old versions use angular-cli.json and new ones use angular.json:

    for "@angular/cli": "~1.7.4" use angular-cli.json:

    "stylePreprocessorOptions": {
        "includePaths": [
          "../src",
          "./scss"
        ]
      },
    

    for "@angular/cli": "~7.0.6":

    "stylePreprocessorOptions": {
        "includePaths": [
           "./src",
           "./src/scss"
        ]


https://stackoverflow.com/questions/42865697/scss-import-relative-to-root


or 

@import "{}/node_modules/module-name/stylesheet";




No comments:

Post a Comment