igx-palette() により74色もの色を生成
デフォルトフォント:Titillium Web
igx-typography() により変更可能
@import '~@angular/material/theming';
@include mat-core();
$candy-app-primary: mat-palette($mat-indigo);
$candy-app-accent: mat-palette($mat-pink, A200, A100, A400);
$candy-app-theme: mat-light-theme($candy-app-primary, $candy-app-accent);
@include angular-material-theme($candy-app-theme);
@import "~igniteui-angular/lib/core/styles/themes/index";
$primary: #731963 !default;
$secondary: #ce5712 !default;
$app-palette: igx-palette($primary, $secondary);
@include igx-core();
@include igx-theme($app-palette);
@mixin igx-theme($palette, $exclude: (), $legacy-support: true) {
// 中略
@if not(index($exclude, 'igx-ripple')) {
@include igx-ripple($theme: igx-ripple-theme());
}
@if not(index($exclude, 'igx-avatar')) {
@include igx-avatar($theme: igx-avatar-theme());
}
...
// Create a theme.
@mixin angular-material-theme($theme) {
@include mat-core-theme($theme);
@include mat-autocomplete-theme($theme);
@include mat-badge-theme($theme);
@include mat-bottom-sheet-theme($theme);
@include mat-button-theme($theme);
@include mat-chips-theme($theme);
@include mat-table-theme($theme);
...
@Component({
moduleId: module.id,
selector: 'mat-button-toggle',
templateUrl: 'button-toggle.html',
styleUrls: ['button-toggle.css'],
encapsulation: ViewEncapsulation.None,
...
})
export class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit,
// .igx-button-group
@include b(igx-button-group) {
$this: bem--selector-to-string(&);
@include register-component(str-slice($this, 2, -1));
@extend %igx-group-display !optional;
// .igx-button-group__item
@include e(item) {
@extend %igx-group-item !optional;
}
// .igx-button-group__item--selected
@include e(item, $m: selected) {
@extend %igx-group-item !optional;
@extend %igx-group-item-selected !optional;
}
// .igx-button-group__item-content
@include e(item-content) {
@extend %igx-group-item-content !optional;
}
// .igx-button-group--vertical
@include m(vertical) {
@extend %igx-group-display !optional;
@extend %igx-group-vertical !optional;
// .igx-button-group__item
@include e(item) {
@extend %igx-group-item !optional;
@extend %igx-group-item-vertical !optional;
}
// .igx-button-group__item--selected
@include e(item, $m: selected) {
@extend %igx-group-item !optional;
@extend %igx-group-item-selected !optional;
}
}
}
@mixin igx-button-group($theme) {
// 中略
%igx-group-display {
display: flex;
flex-flow: row nowrap;
...
%igx-button--disabled {
color: --var($theme, 'disabled-text-color') !important;
background-color: --var($theme, 'disabled-background-color') !important;
}
}
%igx-group-vertical {
flex-flow: column nowrap;
}
%igx-group-item {
box-sizing: content-box;
flex-grow: 1;
flex-basis: 0;
...
}
%igx-group-item-vertical {
border-left: 0;
border-right: 0;
...
}
%igx-group-item-selected {
color: --var($theme, 'item-selected-text-color');
background-color: --var($theme, 'item-selected-background');
...
}
%igx-group-item-content {
display: flex;
flex-flow: row nowrap;
justify-content: center;
...
}
@include igx-core();
@include igx-theme($app-palette, $legacy-support: false);
// styles.scss
@import "~igniteui-angular/lib/core/styles/themes/index";
@include igx-core();
// デフォルトパレットからのテーマ生成
// $default-palette はデフォルトで使用可能なパレット
@include igx-theme($default-palette, $legacy-support: true);
// styles.scss
@import "~igniteui-angular/lib/core/styles/themes/index";
@include igx-core();
// カスタムパレットを生成し、テーマを生成
$primary: #731963;
$secondary: #2ab759;
$custom-palette: igx-palette($primary, $secondary);
@include igx-theme($custom-palette, $legacy-support: true);
// styles.scss
@import "~igniteui-angular/lib/core/styles/themes/index";
@include igx-core();
// デフォルトテーマ
@include igx-theme($default-palette, $legacy-support: true);
// カスタムテーマ
.custom {
$primary: #731963;
$secondary: #2ab759;
$custom-palette: igx-palette($primary, $secondary);
@include igx-theme($custom-palette, $legacy-support: true);
}
// styles.scss
@import "~igniteui-angular/lib/core/styles/themes/index";
@include igx-core();
// デフォルトテーマ
// カスタムテーマを使用するコンポーネントを除外
@include igx-theme($default-palette, $exclude: (igx-navbar), $legacy-support: true);
// 個別コンポーネントのカスタムテーマ
$nav-primary: #f96a88;
$nav-secondary: #f96a88;
$custom-nav-palette: igx-palette($nav-primary, $nav-secondary);
@include igx-navbar($theme: igx-navbar-theme($custom-nav-palette));
// styles.scss
@import "~igniteui-angular/lib/core/styles/themes/index";
@import "custom-palette";
@include igx-core();
// デフォルトテーマ
@include igx-theme($default-palette, $legacy-support: true);
// カスタムテーマ
.custom {
@include igx-theme($custom-palette, $legacy-support: true);
}
// _custom-palette.scss
@import "~igniteui-angular/lib/core/styles/themes/utilities";
$primary: #731963;
$secondary: #2ab759;
$custom-palette: igx-palette($primary, $secondary);
// *.component.scss
@import "path/to/custom-palette";
:host {
background-color: igx-color($custom-palette, "warn");
}
// styles.scss
@import "~igniteui-angular/lib/core/styles/themes/index";
@import "custom-palette";
@include igx-core();
// デフォルトテーマ
@include igx-theme($default-palette, $legacy-support: true);
// カスタムテーマ
.custom {
@include igx-theme($custom-palette, $legacy-support: true);
}
// フォントのカスタマイズ
@include igx-typography($config: (font-family: fantasy));