小编fso*_*cdn的帖子

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

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

**

  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)) …
Run Code Online (Sandbox Code Playgroud)

sass theming less angular-material

7
推荐指数
0
解决办法
988
查看次数

标签 统计

angular-material ×1

less ×1

sass ×1

theming ×1