Skip to content

Commit

Permalink
5. Update the "all theme" mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Aug 12, 2022
1 parent acc0fcd commit a0d3ef4
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/material/core/_core.import.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@forward '../../cdk/overlay/index.import';
@forward '../../cdk/text-field/index.import';
@forward '../legacy-snack-bar/snack-bar-theme.import';
@forward '../snack-bar/snack-bar-theme.import';
@forward '../tree/tree-theme.import';
@forward 'ripple/ripple.import';
@forward '../badge/badge-theme.import';
Expand Down
2 changes: 1 addition & 1 deletion src/material/core/color/_all-color.import.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@forward '../../../cdk/overlay/index.import';
@forward '../../../cdk/text-field/index.import';
@forward '../../legacy-snack-bar/snack-bar-theme.import';
@forward '../../snack-bar/snack-bar-theme.import';
@forward '../theming/theming.import';
@forward '../ripple/ripple.import';
@forward '../../badge/badge-theme.import';
Expand Down
8 changes: 7 additions & 1 deletion src/material/core/density/private/_all-density.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@use '../../theming/theming';
@use '../../../button/button-theme';
@use '../../../button/icon-button-theme';
@use '../../../button/fab-theme';
@use '../../../expansion/expansion-theme';
@use '../../../stepper/stepper-theme';
@use '../../../toolbar/toolbar-theme';
Expand All @@ -23,9 +25,9 @@
@use '../../../slider/slider-theme';
@use '../../../menu/menu-theme';
@use '../../../list/list-theme';
@use '../../../snack-bar/snack-bar-theme';

@mixin private-all-unmigrated-component-densities($config) {
@include button-theme.density($config);
@include expansion-theme.density($config);
@include stepper-theme.density($config);
@include toolbar-theme.density($config);
Expand Down Expand Up @@ -67,6 +69,10 @@
@include slider-theme.density($config);
@include menu-theme.density($config);
@include list-theme.density($config);
@include snack-bar-theme.density($config);
@include button-theme.density($config);
@include icon-button-theme.density($config);
@include fab-theme.density($config);
@include private-all-unmigrated-component-densities($config);
}

Expand Down
4 changes: 2 additions & 2 deletions src/material/core/theming/_all-theme.import.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@forward '../../../cdk/overlay/index.import';
@forward '../../../cdk/text-field/index.import';
@forward '../../legacy-snack-bar/snack-bar-theme.import';
@forward '../../snack-bar/snack-bar-theme.import';
@forward 'theming.import';
@forward '../ripple/ripple.import';
@forward '../../badge/badge-theme.import';
Expand Down Expand Up @@ -81,6 +81,6 @@
@import '../../toolbar/toolbar-theme';
@import '../../tooltip/tooltip-theme';
@import '../../tree/tree-theme';
@import '../../legacy-snack-bar/snack-bar-theme';
@import '../../snack-bar/snack-bar-theme';
@import '../../form-field/form-field-theme';
@import './theming';
16 changes: 12 additions & 4 deletions src/material/core/theming/_all-theme.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// Import all the theming functionality.
@use '../core-theme';
@use '../option/optgroup-theme';
@use '../option/option-theme';
@use '../../autocomplete/autocomplete-theme';
@use '../../badge/badge-theme';
@use '../../bottom-sheet/bottom-sheet-theme';
@use '../../button/button-theme';
@use '../../button/icon-button-theme';
@use '../../button/fab-theme';
@use '../../button-toggle/button-toggle-theme';
@use '../../card/card-theme';
@use '../../checkbox/checkbox-theme';
Expand Down Expand Up @@ -32,16 +36,14 @@
@use '../../toolbar/toolbar-theme';
@use '../../tooltip/tooltip-theme';
@use '../../tree/tree-theme';
@use '../../legacy-snack-bar/snack-bar-theme';
@use '../../snack-bar/snack-bar-theme';
@use '../../form-field/form-field-theme';
@use './theming';

@mixin private-all-unmigrated-component-themes($theme-or-color-config) {
@include badge-theme.theme($theme-or-color-config);
@include bottom-sheet-theme.theme($theme-or-color-config);
@include button-theme.theme($theme-or-color-config);
@include button-toggle-theme.theme($theme-or-color-config);
@include checkbox-theme.theme($theme-or-color-config);
@include table-theme.theme($theme-or-color-config);
@include datepicker-theme.theme($theme-or-color-config);
@include divider-theme.theme($theme-or-color-config);
Expand All @@ -56,7 +58,6 @@
@include tabs-theme.theme($theme-or-color-config);
@include toolbar-theme.theme($theme-or-color-config);
@include tree-theme.theme($theme-or-color-config);
@include snack-bar-theme.theme($theme-or-color-config);
}

// Create a theme.
Expand All @@ -78,6 +79,13 @@
@include slider-theme.theme($theme-or-color-config);
@include menu-theme.theme($theme-or-color-config);
@include list-theme.theme($theme-or-color-config);
@include optgroup-theme.theme($theme-or-color-config);
@include option-theme.theme($theme-or-color-config);
@include checkbox-theme.theme($theme-or-color-config);
@include button-theme.theme($theme-or-color-config);
@include icon-button-theme.theme($theme-or-color-config);
@include fab-theme.theme($theme-or-color-config);
@include snack-bar-theme.theme($theme-or-color-config);
@include private-all-unmigrated-component-themes($theme-or-color-config);
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/material/core/theming/tests/test-css-variables-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
@use '../../../expansion/expansion-theme';
@use '../../../grid-list/grid-list-theme';
@use '../../../icon/icon-theme';
@use '../../../menu/menu-theme';
@use '../../../paginator/paginator-theme';
@use '../../../progress-spinner/progress-spinner-theme';
@use '../../../sidenav/sidenav-theme';
Expand All @@ -21,7 +20,6 @@
@use '../../../tabs/tabs-theme';
@use '../../../toolbar/toolbar-theme';
@use '../../../tree/tree-theme';
@use '../../../legacy-snack-bar/snack-bar-theme';
@use '../../../legacy-core/theming/all-theme' as legacy-all-theme;

// Recursively replaces all of the values inside a Sass map with a different value.
Expand Down Expand Up @@ -60,7 +58,6 @@
@include expansion-theme.theme($css-var-theme);
@include grid-list-theme.theme($css-var-theme);
@include icon-theme.theme($css-var-theme);
@include menu-theme.theme($css-var-theme);
@include paginator-theme.theme($css-var-theme);
@include progress-spinner-theme.theme($css-var-theme);
@include sidenav-theme.theme($css-var-theme);
Expand All @@ -69,6 +66,5 @@
@include tabs-theme.theme($css-var-theme);
@include toolbar-theme.theme($css-var-theme);
@include tree-theme.theme($css-var-theme);
@include snack-bar-theme.theme($css-var-theme);
@include legacy-all-theme.all-legacy-component-themes($css-var-theme);
}
4 changes: 2 additions & 2 deletions src/material/core/typography/_all-typography.import.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@forward '../../legacy-snack-bar/snack-bar-theme.import';
@forward '../../snack-bar/snack-bar-theme.import';
@forward '../../tree/tree-theme.import';
@forward '../../badge/badge-theme.import';
@forward '../../button/button-theme.import';
Expand Down Expand Up @@ -69,7 +69,7 @@
@import '../../tabs/tabs-theme';
@import '../../toolbar/toolbar-theme';
@import '../../tooltip/tooltip-theme';
@import '../../legacy-snack-bar/snack-bar-theme';
@import '../../snack-bar/snack-bar-theme';
@import '../option/option-theme';
@import '../option/optgroup-theme';
@import '../../form-field/form-field-theme';
Expand Down
12 changes: 8 additions & 4 deletions src/material/core/typography/_all-typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
@use '../../badge/badge-theme';
@use '../../bottom-sheet/bottom-sheet-theme';
@use '../../button/button-theme';
@use '../../button/icon-button-theme';
@use '../../button/fab-theme';
@use '../../button-toggle/button-toggle-theme';
@use '../../card/card-theme';
@use '../../checkbox/checkbox-theme';
Expand Down Expand Up @@ -30,7 +32,7 @@
@use '../../tabs/tabs-theme';
@use '../../toolbar/toolbar-theme';
@use '../../tooltip/tooltip-theme';
@use '../../legacy-snack-bar/snack-bar-theme';
@use '../../snack-bar/snack-bar-theme';
@use '../option/option-theme';
@use '../option/optgroup-theme';
@use '../../form-field/form-field-theme';
Expand All @@ -41,9 +43,7 @@
@include badge-theme.typography($config);
@include typography.typography-hierarchy($config);
@include bottom-sheet-theme.typography($config);
@include button-theme.typography($config);
@include button-toggle-theme.typography($config);
@include checkbox-theme.typography($config);
@include divider-theme.typography($config);
@include table-theme.typography($config);
@include datepicker-theme.typography($config);
Expand All @@ -57,7 +57,6 @@
@include sort-theme.typography($config);
@include tabs-theme.typography($config);
@include toolbar-theme.typography($config);
@include snack-bar-theme.typography($config);
@include tree-theme.typography($config);
}

Expand Down Expand Up @@ -94,6 +93,11 @@
@include slider-theme.typography($config);
@include menu-theme.typography($config);
@include list-theme.typography($config);
@include checkbox-theme.typography($config);
@include button-theme.typography($config);
@include icon-button-theme.typography($config);
@include fab-theme.typography($config);
@include snack-bar-theme.typography($config);
}

// @deprecated Use `all-component-typographies`.
Expand Down
2 changes: 2 additions & 0 deletions src/material/legacy-core/theming/_all-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@use '../../legacy-slider/slider-theme';
@use '../../legacy-menu/menu-theme';
@use '../../legacy-list/list-theme';
@use '../../legacy-snack-bar/snack-bar-theme';

// Create a theme.
@mixin all-legacy-component-themes($theme-or-color-config) {
Expand All @@ -39,6 +40,7 @@
@include slider-theme.theme($theme-or-color-config);
@include menu-theme.theme($theme-or-color-config);
@include list-theme.theme($theme-or-color-config);
@include snack-bar-theme.theme($theme-or-color-config);
@include all-theme.private-all-unmigrated-component-themes($theme-or-color-config);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/material/legacy-core/typography/_all-typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@use '../../legacy-slider/slider-theme';
@use '../../legacy-menu/menu-theme';
@use '../../legacy-list/list-theme';
@use '../../legacy-snack-bar/snack-bar-theme';

// Includes all of the typographic styles.
@mixin all-legacy-component-typographies($config-or-theme: null) {
Expand Down Expand Up @@ -55,6 +56,7 @@
@include slider-theme.typography($config);
@include menu-theme.typography($config);
@include list-theme.typography($config);
@include snack-bar-theme.typography($config);
}

// @deprecated Use `all-legacy-component-typographies`.
Expand Down

0 comments on commit a0d3ef4

Please sign in to comment.