You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify use of non-standard "align" attribute for mat-dialog-actions #18479
P4A relatively minor issue that is not relevant to core functionsarea: material/dialogdocsThis issue is related to documentationgood first issueLabel noting a good first issue to be worked on by a community member
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).
The dialog isn't meant to use the align attribute, but align is a custom attribute. It didn't make sense to turn it into an input, because it's only used for styling.
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).
Question: Would adding an input and removing the css code count as feat, fix or docs in the type when I commit? I think it's hard to classify things like this.
As of now, my solution would be a breaking for those using [attr.align]="x". I'd assume this is a very special case, probably only used for demo apps. Should I solve it in some other way, such as adding an input that is called justify and keep the old scss code for backwards compability?
P4A relatively minor issue that is not relevant to core functionsarea: material/dialogdocsThis issue is related to documentationgood first issueLabel noting a good first issue to be worked on by a community member
Activity
crisbeto commentedon Feb 17, 2020
The dialog isn't meant to use the
alignattribute, butalignis a custom attribute. It didn't make sense to turn it into an input, because it's only used for styling.devversion commentedon May 26, 2020
I would agree that this is confusing. Given that
alignis not standard forHTMLDivElement, 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
PooSham commentedon Dec 17, 2020
I could take this as my first issue I think. A fun christmas activity 😁🎅
PooSham commentedon Dec 21, 2020
Question: Would adding an input and removing the css code count as
feat,fixordocsin the type when I commit? I think it's hard to classify things like this.PooSham commentedon Dec 22, 2020
As of now, my solution would be a breaking for those using
[attr.align]="x". I'd assume this is a very special case, probably only used for demo apps. Should I solve it in some other way, such as adding an input that is calledjustifyand keep the old scss code for backwards compability?fix(material/dialog): make align attribute into an input of dialog ac…
fix(material-experimental/mdc-dialog): make align attr into an input …
fix(material-experimental/mdc-dialog): make align attr into an input …
fix(material-experimental/mdc-dialog): make align attr into an input …
3 remaining items
Merge branch 'angular-master' into align-attr-as-input-in-dialog-acti…
Merge branch 'angular:master' into align-attr-as-input-in-dialog-acti…
Merge branch 'angular:master' into align-attr-as-input-in-dialog-acti…
fix(material/dialog): Use align as @input() in MatDialogActions
Merge branch 'angular:master' into align-attr-as-input-in-dialog-acti…
fix(material/dialog): Use align as @input() in MatDialogActions
fix(material/dialog): Squashed commit of the following:
fix(material/dialog): Merge origin/master
fix(material/dialog): Merge remote-tracking branch 'devversion/run-ci…
fix(material/dialog): Use `align` as `@Input()` in `MatDialogActions` (…
fix(material/dialog): Use `align` as `@Input()` in `MatDialogActions` (…
angular-automatic-lock-bot commentedon Mar 14, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(material/dialog): Use `align` as `@Input()` in `MatDialogActions` (…