Skip to content

Commit 8e9625e

Browse files
authored
docs: fix double will in list mdc migration snippet (#25704)
Also kept the Prettier formatting recommendations-omitting the trailing whitespace. Should be good to keep.
1 parent 218297a commit 8e9625e

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

guides/v15-mdc-migration.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Migrating to MDC-based Angular Material Components
22

3-
In Angular Material v15, many of the components have been refactored to be based on the official
3+
In Angular Material v15, many of the components have been refactored to be based on the official
44
[Material Design Components for Web (MDC)](https://github.com/material-components/material-components-web).
55
The components from the following imports have been refactored:
66

@@ -32,7 +32,7 @@ The components from the following imports have been refactored:
3232
The refactored components offer several benefits over the old implementations, including:
3333
* Improved accessibility
3434
* Better adherence to the Material Design spec
35-
* Faster adoption of future versions of the Material Design spec, due to being based on common
35+
* Faster adoption of future versions of the Material Design spec, due to being based on common
3636
infrastructure
3737

3838
## What has changed?
@@ -109,7 +109,7 @@ much as it can automatically.
109109
#### Running a Partial Migration
110110

111111
Depending on the size and complexity of your application, you may want to migrate a single component
112-
(or small group of components) at a time, rather than all at once.
112+
(or small group of components) at a time, rather than all at once.
113113
TODO(wagnermaciel): Add details on this: script params, which components need to move together
114114

115115
You may also want to migrate your app one module at a time instead of all together. You can use both
@@ -133,7 +133,7 @@ TODO(amysorto): Can we have the schematic generate a CSV of TODOs that can be im
133133
### 4. Verify Your Application
134134

135135
After running the migration and addressing the TODOs, manually verify that everything is working
136-
correctly.
136+
correctly.
137137

138138
Run your tests and confirm that they pass. It's possible that your tests depended on internal DOM or
139139
async timing details of the old component implementations and may need to be updated. If you find
@@ -166,7 +166,7 @@ DOM and CSS of the components, you may need to tweak some of your application's
166166

167167
@include mat.all-component-typographies();
168168
```
169-
169+
170170
or individually for components your application uses:
171171

172172
```scss
@@ -176,7 +176,7 @@ DOM and CSS of the components, you may need to tweak some of your application's
176176
@include mat.card-typography();
177177
// ...
178178
```
179-
179+
180180
* Default typography levels defined by `mat.define-typography-config` have been updated to reflect
181181
changes to the Material Design spec.
182182

@@ -185,15 +185,15 @@ DOM and CSS of the components, you may need to tweak some of your application's
185185

186186
```scss
187187
@import '@angular/material' as mat;
188-
188+
189189
$theme: mat.define-light-theme((
190190
color: ...
191191
));
192-
192+
193193
// Adds density level 0 styles
194194
@include mat.all-component-themes($theme);
195195
```
196-
196+
197197
If you prefer a different default density level, you can set it in your theme config:
198198

199199
```scss
@@ -213,7 +213,7 @@ TODO(mmalerba): link to density docs once they exist.
213213

214214
* Accessibility: Icon buttons are now 48px instead of 40px.
215215

216-
* Accessibility: Buttons have a slightly different hover/focus/active colors, improving contrast
216+
* Accessibility: Buttons have a slightly different hover/focus/active colors, improving contrast
217217
ratios.
218218

219219
* Flat buttons have a different padding than raised buttons (this is apparent if you manually apply
@@ -282,10 +282,10 @@ TODO(mmalerba): link to density docs once they exist.
282282
pattern. This is the only variant that supports selection state for chips. This pattern aligns
283283
with the filter chips pattern specified in the Material Design spec. This pattern should be used
284284
when you want the user to select one or more values from a list of options.
285-
285+
286286
* `<mat-chip-grid>` with `<mat-chip-row>` - this pattern should be used for any text input + chips
287287
interaction.
288-
288+
289289
* `<mat-chip-set>` with `<mat-chip>` - this variant has no accessibility pattern and assumes one
290290
will be applied at the application level. This allows the application to implement a custom
291291
accessibility pattern with the chips visuals.
@@ -301,8 +301,8 @@ TODO(mmalerba): link to density docs once they exist.
301301
not use any of the directives like `mat-dialog-content`.
302302

303303
* `mat-dialog-content` uses the font-settings specified by the Material Design spec, which includes
304-
a rather roomy line-height. If you have an information-dense dialog that doesn't look good with
305-
these settings, you can avoid using `<mat-dialog-content>` and just use a div with custom padding,
304+
a rather roomy line-height. If you have an information-dense dialog that doesn't look good with
305+
these settings, you can avoid using `<mat-dialog-content>` and just use a div with custom padding,
306306
or use custom typography settings that can be applied with the `mat.mdc-dialog-typography` mixin.
307307

308308
* The old dialog triggered an extra change detection, which may have masked change detection issues
@@ -326,7 +326,7 @@ TODO(mmalerba): link to density docs once they exist.
326326

327327
* The text inside `<mat-hint>` is larger and darker in order to meet W3C text guidelines.
328328

329-
* While the previous form-field had a single directive for prefixes (`matPrefix`) and a single
329+
* While the previous form-field had a single directive for prefixes (`matPrefix`) and a single
330330
directive for suffixes (`matSuffix`), the MDC-based form-field distinguishes between text
331331
prefix/suffixes which are baseline aligned with the input text, and icon prefix/suffixes which are
332332
center aligned in the form-field. Use `matTextPrefix` or `matTextSuffix` to indicate a text
@@ -364,7 +364,7 @@ TODO(mmalerba): link to density docs once they exist.
364364
directives:
365365
* `matListItemTitle`
366366
* `matListItemLine`
367-
367+
368368
* Text outside of a `matListItemLine` (so-called "unscoped content") will result in an additional
369369
line being acquired (as if the content was put into a line).
370370

@@ -374,16 +374,16 @@ TODO(mmalerba): link to density docs once they exist.
374374
Second line
375375
</mat-list-item>
376376
```
377-
377+
378378
* The amount of lines is automatically inferred. e.g. in the snippet above the list item will
379379
acquire space for two lines. With the new API you can now set an explicit number of lines on the
380380
`<mat-list-item>` to activate wrapping.
381381

382382
```html
383383
<mat-list-item lines="3">
384384
<span matListItemTitle>Title</span>
385-
This will text will wrap into the third line. Space for three lines is acquired by the list
386-
item.
385+
This text will wrap into the third line. Space for three lines is acquired by the
386+
list item.
387387
</mat-list-item>
388388
```
389389

@@ -396,7 +396,7 @@ TODO(mmalerba): link to density docs once they exist.
396396
* `matListAvatar` is now `matListItemAvatar`
397397

398398
* Lastly, also a new directive (`matListItemMeta`) is available to put content into the meta section
399-
of a list item (usually the end of the list item). Previously unscoped content in a list item was
399+
of a list item (usually the end of the list item). Previously unscoped content in a list item was
400400
put into the meta section.
401401

402402
* Recommended migration steps for common use of a list item:
@@ -412,7 +412,7 @@ TODO(mmalerba): link to density docs once they exist.
412412

413413
* If you have a piece of content such as an `<img>` that you want to use in place of a
414414
`<mat-icon>` use `ngProjectAs="mat-icon"` to project it into the icon slot.
415-
415+
416416
* If you need your icon to appear at the end of the item (not officially supported by the spec)
417417
you can wrap both the text and your icon in a span, e.g.
418418

@@ -422,7 +422,7 @@ TODO(mmalerba): link to density docs once they exist.
422422
<mat-icon>end_icon</mat-icon>
423423
</span>
424424
```
425-
425+
426426
* The text in menu items wrap instead of being hidden with an ellipses.
427427

428428
### Option / Optgroup

0 commit comments

Comments
 (0)