是否可以使用 less 来定义自定义主题角度材质?

fso*_*cdn 7 sass theming less angular-material

我已经开始为我的角度项目应用自定义主题,但我有点困惑是否可以将主题定义为较少的文件。我的新主题的层次结构是这样的:

**

  1. -自定义主题.scss

  2. -自定义组件主题.scss

** 期望的是 **

  1. -自定义主题.less
  2. -自定义组件主题.less

**

-- 自定义组件主题.scss 示例:

    // 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 ;
    }
Run Code Online (Sandbox Code Playgroud)

先感谢您