-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(multiple): convert components to theme inspection API
- Loading branch information
Showing
17 changed files
with
429 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
@use '../theming/all-theme'; | ||
@use '../theming/theming'; | ||
@use '../theming/inspection'; | ||
|
||
// Includes all of the color styles. | ||
@mixin all-component-colors($config-or-theme) { | ||
// In case a theme object has been passed instead of a configuration for | ||
// the color system, extract the color config from the theme object. | ||
$config: if(theming.private-is-theme-object($config-or-theme), | ||
theming.get-color-config($config-or-theme), $config-or-theme); | ||
|
||
@if $config == null { | ||
@mixin all-component-colors($theme) { | ||
@if not inspection.theme-has($theme, color) { | ||
@error 'No color configuration specified.'; | ||
} | ||
|
||
@include all-theme.all-component-themes(( | ||
color: $config, | ||
typography: null, | ||
density: null, | ||
)); | ||
@include all-theme.all-component-themes( | ||
inspection.theme-remove($theme, base, typography, density)); | ||
} | ||
|
||
// @deprecated Use `all-component-colors`. | ||
@mixin angular-material-color($config-or-theme) { | ||
@include all-component-colors($config-or-theme); | ||
@mixin angular-material-color($theme) { | ||
@include all-component-colors($theme); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.