question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clarify use of non-standard "align" attribute for mat-dialog-actions

See original GitHub issue

Documentation Feedback

Documentation suggests using the align attribute to align the content of mat-dialog-actions directives to the middle or right. However, align is an obsolete HTML attribute and not valid HTML5, and my IDE’s static code analysis tools rightfully complain about using it. If using align really is the right way of doing this regardless of W3C standards, this should be clarified in the docs (and possibly be explicitly declared as a property of the MatDialogActions directive to make IDEs stop complaining).

Affected documentation page: https://material.angular.io/components/dialog/overview

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
devversioncommented, May 26, 2020

I would agree that this is confusing. Given that align is not standard for HTMLDivElement, I think it would make sense to turn this into an input w/ documentation (that would also help w/ type-checking; IDE’s and bindings).

https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement

1reaction
PooShamcommented, Dec 17, 2020

I could take this as my first issue I think. A fun christmas activity 😁🎅

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to align button right inside Dialog angular material?
You can use the align HTML attribute: <div mat-dialog-content> <p>What's your favorite animal?</p> <mat-form-field> <input matInput ...
Read more >
@angular/material | Yarn - Package Manager
This aligns with @angular/cdk , makes clear where symbols originate, and helps safeguard against including unused code. The deprecated style will be removed...
Read more >
mat-dialog-actions align right/left/center
Learn how to align mat-dialog-actions buttons in Angular material dialog component.
Read more >
@angular/material: Versions | Openbase
schematics: add clarification about directory path format for MDC migration schematic (#25969) ... dialog: Use align as @Input() in MatDialogActions (#24328).
Read more >
How To align mat-dialog-actions buttons to the right,center or left
To align mat dialog actions buttons to the right center or left we can make use of `align` attribute.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found