[X] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
14
Description
There are several issues when you are trying to use mat-icon inside mat-button.
Issue 1.
Button layout is not consistent if we are using ng-container, mat-icon is put in .mdc-button__label which leads to inconsistence in how styles are applied to an icon and text near it.
Of course ng-container as a structural component shouldn't have influence on how button is structured.
Is this a regression?
The previous version in which this bug was not present was
14
Description
There are several issues when you are trying to use
mat-icon
insidemat-button
.Issue 1. Button layout is not consistent if we are using
ng-container
,mat-icon
is put in.mdc-button__label
which leads to inconsistence in how styles are applied to an icon and text near it. Of courseng-container
as a structural component shouldn't have influence on how button is structured.Issue 2. Icon placed after text is appearing before text.
Reproduction
Steps to reproduce showing all 3 issues: Open that stackblitz
Expected Behavior
Issue 1.
mat-icon
or any other custom content should be either inside or outside.mdc-button__label
no matter what structural directives are usedIssue 2.
mat-icon
should be at the same position relative to the text as it is in codeActual Behavior
Issue 1.
mat-icon
is inside.mdc-button__label
if insideng-container
in code and outside - if notIssue 2.
mat-icon
do not preserve an order implemented in codeEnvironment