• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16@use 'sass:map';
17@use '@angular/material' as mat;
18
19@import 'https://fonts.googleapis.com/icon?family=Material+Icons';
20@import '//fonts.googleapis.com/css2?family=Google+Sans';
21
22$typography: mat.define-typography-config(
23    $font-family: 'Roboto, sans-serif'
24);
25
26$primary: mat.define-palette(mat.$blue-palette, 700);
27$accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
28$warn: mat.define-palette(mat.$red-palette);
29
30$light-theme: mat.define-light-theme((
31 color: (
32   primary: $primary,
33   accent: $accent,
34   warn: $warn,
35 ),
36 density: 0,
37 typography: null, // Set typography on mat.core() only, to avoid duplicates.
38));
39
40$dark-theme: mat.define-dark-theme((
41  color: (
42    primary: $primary,
43    accent: $accent,
44    warn: $warn,
45  )
46));
47
48@mixin border-color($theme) {
49  $color: mat.get-color-config($theme);
50  $foreground: map.get($color, 'foreground');
51
52  & {
53    --border-color: #{mat.get-color-from-palette($foreground, divider)};
54  }
55}
56
57@include mat.core($typography);
58@include mat.all-component-themes($light-theme);
59
60body:not(.dark-mode) {
61  @include border-color($light-theme);
62}
63
64body.dark-mode {
65  @include mat.all-component-colors($dark-theme);
66  @include border-color($dark-theme);
67}
68