markdown 从库中添加mixins

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 从库中添加mixins相关的知识,希望对你有一定的参考价值。

# Add mixins from Library

[SOURCE](https://github.com/material-components/material-components-web/issues/3036#issuecomment-403130482)

The example library is [angular-mdc-web](https://trimox.github.io/angular-mdc-web/#/angular-mdc-web/button-demo/sass).

In order to use the custom mixins from the library add this to `angular.json` file in the `project.architect.build.options` section:

```
...
"stylePreprocessorOptions": {
     "includePaths": [
           "node_modules"
      ]
}
...
```

Then in your component `scss`, find the path to the mixins file in the `node_modules` and import it as follow:

```css
// path from node_modules for mdc-text-field
@import "@angular-mdc/theme/scss/textfield/mdc-text-field";

// use like this:
mdc-text-field {
  @include mdc-text-field-textarea-fill-color(red);
}
```

以上是关于markdown 从库中添加mixins的主要内容,如果未能解决你的问题,请参考以下文章