3.0.1 • Published 8 months ago

@thecodecampus/angular-material-theme v3.0.1

Weekly downloads
31
License
CC-BY-NC-ND-4.0
Repository
github
Last release
8 months ago

Angular Material Theme for theCodeCampus

This repository contains a theme for Angular Material with the styling and colors of theCodeCampus.

Installation

  • Install Angular Material and it's peer dependencies as described on material.angular.io
  • Skip including a prebuild theme
  • Install theme via npm npm install @theCodeCampus/angular-material-theme
  • Add following code to your global style.scss

    @import '@thecodecampus/angular-material-theme/src/styling/theme';
    
    @include tcc-angular-material-theme();
    // for dark theme use @include tcc-angular-material-dark-theme() instead
    // @include tcc-angular-material-dark-theme();

Applying the theme background to body

If you want to apply the theme background to all elements, add the class mat-app-background to the body element inside your index.html

<body class="mat-app-background mat-app-foreground">
  <app-root></app-root>
</body>

How to override colors or typography

To override colors, you can use the variables $tcc-primary or $tcc-accent. For typography, you can use the variable $custom-typography.

To override the font family, use the variable $tcc-font-family.

// import theme
@import '@thecodecampus/angular-material-theme/src/styling/theme';
// import alternate font family
@import '@fontsource/source-code-pro';

// set $tcc-font-family before including the theme
$tcc-font-family: "Source Code Pro";
@include tcc-angular-material-theme();
3.0.1

8 months ago

3.0.0

1 year ago

2.3.0

2 years ago

2.2.0

5 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago