Skip to content

Commit

Permalink
MDC Migration: Apply tb theme to new mat components (#6562)
Browse files Browse the repository at this point in the history
## Motivation for features / changes
We are starting to use the new MDC components. This applies our theme to
those components so they are the correct colors.
  • Loading branch information
JamesHollyer authored Aug 29, 2023
1 parent 9b94eeb commit bc3d387
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tensorboard/webapp/theme/_tb_theme.template.scss
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,14 @@ $tb-dark-theme: map_merge(

// Apply themed style for the global stylesheet (styles.scss).
@mixin tb-global-themed-styles() {
// TODO(JamesHollyer): remove legacy component themes once all components
// are migrated.
@include mat.core();
@include mat.all-legacy-component-typographies();
@include mat.all-component-typographies();
// Include all theme-styles for the components based on the current theme.
@include mat.all-legacy-component-themes($tb-theme);
@include mat.all-component-themes($tb-theme);

body {
// Prevents ngx-color-picker from creating a scrollbar and misposition.
Expand Down Expand Up @@ -299,6 +303,9 @@ $tb-dark-theme: map_merge(
}
}

// TODO(JamesHollyer): remove legacy component themes once all components
// are migrated.
@include mat.all-component-themes($tb-dark-theme);
@include mat.all-legacy-component-themes($tb-dark-theme);
}
}

0 comments on commit bc3d387

Please sign in to comment.