Tema Padrão

    A versão light do tema Material é o tema padrão no Ignite UI for Angular. Para usá-lo, você precisa incluir o mixin theme após o mixin core.

    @use "igniteui-angular/theming" as *;
    
    // IMPORTANT: Prior to Ignite UI for Angular version 13 use:
    // @import '~igniteui-angular/lib/core/styles/themes/index';
    @include core();
    @include theme(
      $palette: $light-material-palette,
      $schema: $light-material-schema
    );
    
    // We can also include the Material font and font scaling
    @include typography(
      $font-family: $material-typeface,
      $type-scale: $material-type-scale
    );
    

    Material Dark Theme

    @use "igniteui-angular/theming" as *;
    
    // IMPORTANT: Prior to Ignite UI for Angular version 13 use:
    // @import '~igniteui-angular/lib/core/styles/themes/index';
    @include core();
    @include theme(
      $palette: $dark-material-palette,
      $schema: $dark-material-schema
    );
    
    @include typography(
      $font-family: $material-typeface,
      $type-scale: $material-type-scale
    );
    

    Se você quiser usar apenas o esquema escuro, mas com sua própria paleta, você terá que fazer manualmente o seguinte:

    @use "igniteui-angular/theming" as *;
    
    // IMPORTANT: Prior to Ignite UI for Angular version 13 use:
    // @import '~igniteui-angular/lib/core/styles/themes/index';
    @include core();
    
    $primary-color: #2ab759;
    $secondary-color: #f96a88;
    $surface-color: #303030;
    
    // IMPORTANT, the primary, secondary and surface colors are required
    // The $gray will ensure that all the black text, borders, etc will become a shade of white in order to be visible against a dark background
    $my-color-palette: palette(
      $primary: $primary-color,
      $secondary: $secondary-color,
      $surface: $surface-color,
      $gray: #fff,
    );
    
    @include theme($my-color-palette, $schema: $dark-schema);
    

    Como todos os componentes individuais usam $light-material-palette por padrão, se você não especificar o restante das cores, como $info e $error, elas usarão seus valores padrão de $light-material-palette.

    API Overview