-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(material/core): namespace m2-specific theming APIs (#28892)
These changes rename the theming APIs that are specific to M2 to be prefixed with `m2-`. Subsequent changes will move the M3 APIs out of `experimental` and introduce a schematic to automatically migrate users. BREAKING CHANGE: The following APIs have been renamed. If you update using `ng update`, your app will be fixed automatically. * `define-light-theme` to `m2-define-light-theme` * `define-dark-theme` to `m2-define-dark-theme` * `define-palette` to `m2-define-palette` * `get-contrast-color-from-palette` to `m2-get-contrast-color-from-palette` * `get-color-from-palette` to `m2-get-color-from-palette` * `get-color-config` to `m2-get-color-config` * `get-typography-config` to `m2-get-typography-config` * `get-density-config` to `m2-get-density-config` * `$red-palette` to `$m2-red-palette` * `$pink-palette` to `$m2-pink-palette` * `$indigo-palette` to `$m2-indigo-palette` * `$purple-palette` to `$m2-purple-palette` * `$deep-purple-palette` to `$m2-deep-purple-palette` * `$blue-palette` to `$m2-blue-palette` * `$light-blue-palette` to `$m2-light-blue-palette` * `$cyan-palette` to `$m2-cyan-palette` * `$teal-palette` to `$m2-teal-palette` * `$green-palette` to `$m2-green-palette` * `$light-green-palette` to `$m2-light-green-palette` * `$lime-palette` to `$m2-lime-palette` * `$yellow-palette` to `$m2-yellow-palette` * `$amber-palette` to `$m2-amber-palette` * `$orange-palette` to `$m2-orange-palette` * `$deep-orange-palette` to `$m2-deep-orange-palette` * `$brown-palette` to `$m2-brown-palette` * `$grey-palette` to `$m2-grey-palette` * `$gray-palette` to `$m2-gray-palette` * `$blue-grey-palette` to `$m2-blue-grey-palette` * `$blue-gray-palette` to `$m2-blue-gray-palette` * `$light-theme-background-palette` to `$m2-light-theme-background-palette` * `$dark-theme-background-palette` to `$m2-dark-theme-background-palette` * `$light-theme-foreground-palette` to `$m2-light-theme-foreground-palette` * `$dark-theme-foreground-palette` to `$m2-dark-theme-foreground-palette` * `define-typography-level` to `m2-define-typography-level` * `define-rem-typography-config` to `m2-define-rem-typography-config` * `define-typography-config` to `m2-define-typography-config` * `define-legacy-typography-config` to `m2-define-legacy-typography-config` * `typography-level` to `m2-typography-level` * `font-size` to `m2-font-size` * `line-height` to `m2-line-height` * `font-weight` to `m2-font-weight` * `letter-spacing` to `m2-letter-spacing` * `font-family` to `m2-font-family` * `font-shorthand` to `m2-font-shorthand`
- Loading branch information
Showing
10 changed files
with
138 additions
and
93 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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// M2-specific theming APIs which are separated out into this file so they | ||
// can be renamed conditionally depending on whether we're in 1P or 3P. | ||
@forward './theming/theming' show | ||
define-light-theme, | ||
define-dark-theme, | ||
define-palette, | ||
get-contrast-color-from-palette, | ||
get-color-from-palette, | ||
get-color-config, | ||
get-typography-config, | ||
get-density-config; | ||
|
||
@forward './theming/palette' show | ||
$red-palette, | ||
$pink-palette, | ||
$indigo-palette, | ||
$purple-palette, | ||
$deep-purple-palette, | ||
$blue-palette, | ||
$light-blue-palette, | ||
$cyan-palette, | ||
$teal-palette, | ||
$green-palette, | ||
$light-green-palette, | ||
$lime-palette, | ||
$yellow-palette, | ||
$amber-palette, | ||
$orange-palette, | ||
$deep-orange-palette, | ||
$brown-palette, | ||
$grey-palette, | ||
$gray-palette, | ||
$blue-grey-palette, | ||
$blue-gray-palette, | ||
$light-theme-background-palette, | ||
$dark-theme-background-palette, | ||
$light-theme-foreground-palette, | ||
$dark-theme-foreground-palette; | ||
|
||
|
||
@forward './typography/typography' show | ||
define-typography-level, | ||
define-rem-typography-config, | ||
define-typography-config, | ||
define-legacy-typography-config; | ||
|
||
@forward './typography/typography-utils' show | ||
typography-level, | ||
font-size, | ||
line-height, | ||
font-weight, | ||
letter-spacing, | ||
font-family, | ||
font-shorthand; |
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
Oops, something went wrong.