Sass 是否可以使用更少的资源定义自定义主题角度材质?

Sass 是否可以使用更少的资源定义自定义主题角度材质?,sass,angular-material,less,theming,Sass,Angular Material,Less,Theming,我已经开始为我的angular项目应用自定义主题,但我有点困惑是否可以将主题定义为更少的文件。 我的新主题的层次结构如下所示: ** -custom-theme.scss -自定义组件-themes.scss ** 所期望的是 ** -自定义主题 -自定义组件-主题。无 ** --custom-components-themes.scss EAX示例: // you only have to add additional componenets here (instead of in e

我已经开始为我的angular项目应用自定义主题,但我有点困惑是否可以将主题定义为更少的文件。 我的新主题的层次结构如下所示:

**

  • -custom-theme.scss

  • -自定义组件-themes.scss

  • ** 所期望的是 **

  • -自定义主题
  • -自定义组件-主题。无
  • **

    --custom-components-themes.scss EAX示例:

        // you only have to add additional componenets here (instead of in every theme class)
    @mixin custom-components-theme($theme) {
        // Extract whichever individual palettes you need from the theme.
        $primary: map-get($theme, primary);
        $accent: map-get($theme, accent);
        $background-color: map_get($primary, A1000);
    
        // Use mat-color to extract individual colors from a palette as necessary.
        .mat-sidenav {
            Background: linear-gradient( mat-color($primary, A900), mat-color($primary, A1000)) ;    }
        .mat-sidenav .mat-toolbar {
            background-image: linear-gradient(mat-color($primary, A50), mat-color($primary, A800)) !important;
            color: mat-color($primary, 50) ;
            font-family: "Segoe UI";
            font-size: 23px ;
        }
    
    先谢谢你