Skip to content

Commit 2585350

Browse files
committed
docs: Update references to M2 theming guide color variants section and add link to styling tab for color input descriptions (#30282)
(cherry picked from commit 64c07fb)
1 parent 1eb6cab commit 2585350

24 files changed

+70
-69
lines changed

guides/material-2.md

+1-1
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+6-6
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

+4-4
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

+4-4
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() {

src/material/list/list-option.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ export class MatListOption extends MatListItemBase implements ListOption, OnInit
133133

134134
/**
135135
* Theme color of the list option. This sets the color of the checkbox/radio.
136-
* This API is supported in M2 themes only, it has no effect in M3 themes.
136+
* This API is supported in M2 themes only, it has no effect in M3 themes. For color customization
137+
* in M3, see https://material.angular.io/components/list/styling.
137138
*
138139
* For information on applying color variants in M3, see
139-
* https://material.angular.io/guide/theming#using-component-color-variants.
140+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
140141
*/
141142
@Input()
142143
get color(): ThemePalette {

src/material/list/selection-list.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ export class MatSelectionList
103103
/**
104104
* Theme color of the selection list. This sets the checkbox color for all
105105
* list options. This API is supported in M2 themes only, it has no effect in
106-
* M3 themes.
106+
* M3 themes. For color customization in M3, see https://material.angular.io/components/list/styling.
107107
*
108108
* For information on applying color variants in M3, see
109-
* https://material.angular.io/guide/theming#using-component-color-variants.
109+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
110110
*/
111111
@Input() color: ThemePalette = 'accent';
112112

src/material/paginator/paginator.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ export class MatPaginator implements OnInit, OnDestroy {
124124

125125
/**
126126
* Theme color of the underlying form controls. This API is supported in M2
127-
* themes only,it has no effect in M3 themes.
127+
* themes only,it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/paginator/styling.
128128
*
129129
* For information on applying color variants in M3, see
130-
* https://material.angular.io/guide/theming#using-component-color-variants.
130+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
131131
*/
132132
@Input() color: ThemePalette;
133133

src/material/progress-bar/progress-bar.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ export interface ProgressAnimationEnd {
3636
export interface MatProgressBarDefaultOptions {
3737
/**
3838
* Default theme color of the progress bar. This API is supported in M2 themes only,
39-
* it has no effect in M3 themes.
39+
* it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/progress-bar/styling.
4040
*
4141
* For information on applying color variants in M3, see
42-
* https://material.angular.io/guide/theming#using-component-color-variants.
42+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
4343
*/
4444
color?: ThemePalette;
4545

@@ -139,10 +139,10 @@ export class MatProgressBar implements AfterViewInit, OnDestroy {
139139
// TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.
140140
/**
141141
* Theme color of the progress bar. This API is supported in M2 themes only, it
142-
* has no effect in M3 themes.
142+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/progress-bar/styling.
143143
*
144144
* For information on applying color variants in M3, see
145-
* https://material.angular.io/guide/theming#using-component-color-variants.
145+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
146146
*/
147147
@Input()
148148
get color() {

src/material/progress-spinner/progress-spinner.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ export type ProgressSpinnerMode = 'determinate' | 'indeterminate';
2828
export interface MatProgressSpinnerDefaultOptions {
2929
/**
3030
* Default theme color of the progress spinner. This API is supported in M2 themes only, it
31-
* has no effect in M3 themes.
31+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/progress-spinner/styling.
3232
*
3333
* For information on applying color variants in M3, see
34-
* https://material.angular.io/guide/theming#using-component-color-variants.
34+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
3535
*/
3636
color?: ThemePalette;
3737
/** Diameter of the spinner. */
@@ -103,10 +103,10 @@ export class MatProgressSpinner {
103103
// TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.
104104
/**
105105
* Theme color of the progress spinner. This API is supported in M2 themes only, it
106-
* has no effect in M3 themes.
106+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/progress-spinner/styling.
107107
*
108108
* For information on applying color variants in M3, see
109-
* https://material.angular.io/guide/theming#using-component-color-variants.
109+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
110110
*/
111111
@Input()
112112
get color() {

src/material/radio/radio.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ export const MAT_RADIO_GROUP = new InjectionToken<MatRadioGroup>('MatRadioGroup'
7979
export interface MatRadioDefaultOptions {
8080
/**
8181
* Theme color of the radio button. This API is supported in M2 themes only, it
82-
* has no effect in M3 themes.
82+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.
8383
*
8484
* For information on applying color variants in M3, see
85-
* https://material.angular.io/guide/theming#using-component-color-variants.
85+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
8686
*/
8787
color: ThemePalette;
8888

@@ -169,10 +169,10 @@ export class MatRadioGroup implements AfterContentInit, OnDestroy, ControlValueA
169169

170170
/**
171171
* Theme color of the radio buttons in the group. This API is supported in M2
172-
* themes only, it has no effect in M3 themes.
172+
* themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.
173173
*
174174
* For information on applying color variants in M3, see
175-
* https://material.angular.io/guide/theming#using-component-color-variants.
175+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
176176
*/
177177
@Input() color: ThemePalette;
178178

@@ -523,10 +523,10 @@ export class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy
523523

524524
/**
525525
* Theme color of the radio button. This API is supported in M2 themes only, it
526-
* has no effect in M3 themes.
526+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/radio/styling.
527527
*
528528
* For information on applying color variants in M3, see
529-
* https://material.angular.io/guide/theming#using-component-color-variants.
529+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
530530
*/
531531
@Input()
532532
get color(): ThemePalette {

src/material/slide-toggle/slide-toggle-config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ export interface MatSlideToggleDefaultOptions {
1515

1616
/**
1717
* Default theme color of the slide toggle. This API is supported in M2 themes only,
18-
* it has no effect in M3 themes.
18+
* it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/slide-toggle/styling.
1919
*
2020
* For information on applying color variants in M3, see
21-
* https://material.angular.io/guide/theming#using-component-color-variants.
21+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
2222
*/
2323
color?: ThemePalette;
2424

src/material/slide-toggle/slide-toggle.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ export class MatSlideToggle
158158
// the lack of type checking previously and assigning random strings.
159159
/**
160160
* Theme color of the slide toggle. This API is supported in M2 themes only,
161-
* it has no effect in M3 themes.
161+
* it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/slide-toggle/styling.
162162
*
163163
* For information on applying color variants in M3, see
164-
* https://material.angular.io/guide/theming#using-component-color-variants.
164+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
165165
*/
166166
@Input() color: string | undefined;
167167

src/material/slider/slider.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ export class MatSlider implements AfterViewInit, OnDestroy, _MatSlider {
149149

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

src/material/stepper/step-header.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ export class MatStepHeader extends CdkStepHeader implements AfterViewInit, OnDes
7676

7777
/**
7878
* Theme color of the step header. This API is supported in M2 themes only, it
79-
* has no effect in M3 themes.
79+
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/stepper/styling.
8080
*
8181
* For information on applying color variants in M3, see
82-
* https://material.angular.io/guide/theming#using-component-color-variants.
82+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
8383
*/
8484
@Input() color: ThemePalette;
8585

src/material/stepper/stepper.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ export class MatStep extends CdkStep implements ErrorStateMatcher, AfterContentI
7070

7171
/**
7272
* Theme color for the particular step. This API is supported in M2 themes
73-
* only, it has no effect in M3 themes.
73+
* only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/stepper/styling.
7474
*
7575
* For information on applying color variants in M3, see
76-
* https://material.angular.io/guide/theming#using-component-color-variants.
76+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
7777
*/
7878
@Input() color: ThemePalette;
7979

@@ -167,10 +167,10 @@ export class MatStepper extends CdkStepper implements AfterContentInit {
167167

168168
/**
169169
* Theme color for all of the steps in stepper. This API is supported in M2
170-
* themes only, it has no effect in M3 themes.
170+
* themes only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/stepper/styling.
171171
*
172172
* For information on applying color variants in M3, see
173-
* https://material.angular.io/guide/theming#using-component-color-variants.
173+
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
174174
*/
175175
@Input() color: ThemePalette;
176176

0 commit comments

Comments
 (0)