Skip to content

Commit 64c07fb

Browse files
authored
docs: Update references to M2 theming guide color variants section and add link to styling tab for color input descriptions (angular#30282)
1 parent 66741b8 commit 64c07fb

File tree

24 files changed

+70
-69
lines changed

24 files changed

+70
-69
lines changed

guides/material-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ the APIs for both are largely the same. However, there are a few differences to
11031103
mixins should be wrapped in a selector. If your app includes such an `@include` at the root level,
11041104
we recommend wrapping it in `html { ... }`
11051105
- M3 has a different API for setting the color variant of a component (see
1106-
[using component color variants](https://material.angular.io/guide/theming#using-component-color-variants)
1106+
[using component color variants](#optional-add-backwards-compatibility-styles-for-color-variants)
11071107
for more).
11081108
- The `backgroundColor` property of `<mat-tab-group>` is not supported, and should not be used with
11091109
M3 themes.

src/material/badge/badge.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ export class MatBadge implements OnInit, OnDestroy {
8181

8282
/**
8383
* Theme color of the badge. This API is supported in M2 themes only, it
84-
* has no effect in M3 themes.
84+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/badge/styling.
8585
*
8686
* For information on applying color variants in M3, see
87-
* https://material.angular.io/guide/theming#using-component-color-variants.
87+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
8888
*/
8989
@Input('matBadgeColor')
9090
get color(): ThemePalette {

src/material/button/button-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ export class MatButtonBase implements AfterViewInit, OnDestroy {
108108

109109
/**
110110
* Theme color of the button. This API is supported in M2 themes only, it has
111-
* no effect in M3 themes.
111+
* no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/button/styling.
112112
*
113113
* For information on applying color variants in M3, see
114-
* https://material.angular.io/guide/theming#using-component-color-variants.
114+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
115115
*/
116116
@Input() color?: string | null;
117117

src/material/button/fab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import {ThemePalette} from '@angular/material/core';
2424
export interface MatFabDefaultOptions {
2525
/**
2626
* Default theme color of the button. This API is supported in M2 themes
27-
* only, it has no effect in M3 themes.
27+
* only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/button/styling.
2828
*
2929
* For information on applying color variants in M3, see
30-
* https://material.angular.io/guide/theming#using-component-color-variants
30+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants.
3131
*/
3232
color?: ThemePalette;
3333
}

src/material/checkbox/checkbox-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import {ThemePalette} from '@angular/material/core';
1212
export interface MatCheckboxDefaultOptions {
1313
/**
1414
* Default theme color of the checkbox. This API is supported in M2 themes
15-
* only, it has no effect in M3 themes.
15+
* only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/checkbox/styling.
1616
*
1717
* For information on applying color variants in M3, see
18-
* https://material.angular.io/guide/theming#using-component-color-variants
18+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
1919
*/
2020
color?: ThemePalette;
2121

src/material/checkbox/checkbox.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ export class MatCheckbox
222222
// the lack of type checking previously and assigning random strings.
223223
/**
224224
* Theme color of the checkbox. This API is supported in M2 themes only, it
225-
* has no effect in M3 themes.
225+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/checkbox/styling.
226226
*
227227
* For information on applying color variants in M3, see
228-
* https://material.angular.io/guide/theming#using-component-color-variants.
228+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
229229
*/
230230
@Input() color: string | undefined;
231231

src/material/chips/chip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ export class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck
178178
// TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.
179179
/**
180180
* Theme color of the chip. This API is supported in M2 themes only, it has no
181-
* effect in M3 themes.
181+
* effect in M3 themes. For color customization in M3, see https://material.angular.io/components/chips/styling.
182182
*
183183
* For information on applying color variants in M3, see
184-
* https://material.angular.io/guide/theming#using-component-color-variants.
184+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
185185
*/
186186
@Input() color?: string | null;
187187

src/material/datepicker/datepicker-base.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ export class MatDatepickerContent<S, D = ExtractDateTypeFromSelection<S>>
150150

151151
/**
152152
* Theme color of the internal calendar. This API is supported in M2 themes
153-
* only, it has no effect in M3 themes.
153+
* only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/datepicker/styling.
154154
*
155155
* For information on applying color variants in M3, see
156-
* https://material.angular.io/guide/theming#using-component-color-variants.
156+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
157157
*/
158158
@Input() color: ThemePalette;
159159

@@ -324,10 +324,10 @@ export interface MatDatepickerPanel<
324324
closedStream: EventEmitter<void>;
325325
/**
326326
* Color palette to use on the datepicker's calendar. This API is supported in M2 themes only, it
327-
* has no effect in M3 themes.
327+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/datepicker/styling.
328328
*
329329
* For information on applying color variants in M3, see
330-
* https://material.angular.io/guide/theming#using-component-color-variants
330+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
331331
*/
332332
color: ThemePalette;
333333
/** The input element the datepicker is associated with. */
@@ -387,10 +387,10 @@ export abstract class MatDatepickerBase<
387387

388388
/**
389389
* Theme color of the datepicker's calendar. This API is supported in M2 themes only, it
390-
* has no effect in M3 themes.
390+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/datepicker/styling.
391391
*
392392
* For information on applying color variants in M3, see
393-
* https://material.angular.io/guide/theming#using-component-color-variants.
393+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
394394
*/
395395
@Input()
396396
get color(): ThemePalette {

src/material/form-field/form-field.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export interface MatFormFieldDefaultOptions {
7474
appearance?: MatFormFieldAppearance;
7575
/**
7676
* Default theme color of the form field. This API is supported in M2 themes only, it has no
77-
* effect in M3 themes.
77+
* effect in M3 themes. For color customization in M3, see https://material.angular.io/components/form-field/styling.
7878
*
7979
* For information on applying color variants in M3, see
80-
* https://material.angular.io/guide/theming#using-component-color-variants
80+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
8181
*/
8282
color?: ThemePalette;
8383
/** Whether the required marker should be hidden by default. */
@@ -225,10 +225,10 @@ export class MatFormField
225225

226226
/**
227227
* Theme color of the form field. This API is supported in M2 themes only, it
228-
* has no effect in M3 themes.
228+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/form-field/styling.
229229
*
230230
* For information on applying color variants in M3, see
231-
* https://material.angular.io/guide/theming#using-component-color-variants.
231+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
232232
*/
233233
@Input() color: ThemePalette = 'primary';
234234

src/material/icon/icon.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ import {MatIconRegistry} from './icon-registry';
3232
export interface MatIconDefaultOptions {
3333
/**
3434
* Theme color of the icon. This API is supported in M2 themes only, it
35-
* has no effect in M3 themes.
35+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/icon/styling.
3636
*
3737
* For information on applying color variants in M3, see
38-
* https://material.angular.io/guide/theming#using-component-color-variants.
38+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
3939
*/
4040
color?: ThemePalette;
4141
/** Font set that the icon is a part of. */
@@ -159,10 +159,10 @@ export class MatIcon implements OnInit, AfterViewChecked, OnDestroy {
159159

160160
/**
161161
* Theme color of the icon. This API is supported in M2 themes only, it
162-
* has no effect in M3 themes.
162+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/icon/styling.
163163
*
164164
* For information on applying color variants in M3, see
165-
* https://material.angular.io/guide/theming#using-component-color-variants.
165+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
166166
*/
167167
@Input()
168168
get color() {

0 commit comments

Comments
 (0)