mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(radio): improved alignment for native validation messages (#13570)
This commit is contained in:
committed by
Joey Perrott
parent
bfc00a005e
commit
dd96369f52
+13
-13
@@ -14,20 +14,20 @@
|
||||
|
||||
<div class="mat-ripple-element mat-radio-persistent-ripple"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input #input class="mat-radio-input cdk-visually-hidden" type="radio"
|
||||
[id]="inputId"
|
||||
[checked]="checked"
|
||||
[disabled]="disabled"
|
||||
[tabIndex]="tabIndex"
|
||||
[attr.name]="name"
|
||||
[required]="required"
|
||||
[attr.aria-label]="ariaLabel"
|
||||
[attr.aria-labelledby]="ariaLabelledby"
|
||||
[attr.aria-describedby]="ariaDescribedby"
|
||||
(change)="_onInputChange($event)"
|
||||
(click)="_onInputClick($event)">
|
||||
<input #input class="mat-radio-input cdk-visually-hidden" type="radio"
|
||||
[id]="inputId"
|
||||
[checked]="checked"
|
||||
[disabled]="disabled"
|
||||
[tabIndex]="tabIndex"
|
||||
[attr.name]="name"
|
||||
[required]="required"
|
||||
[attr.aria-label]="ariaLabel"
|
||||
[attr.aria-labelledby]="ariaLabelledby"
|
||||
[attr.aria-describedby]="ariaDescribedby"
|
||||
(change)="_onInputChange($event)"
|
||||
(click)="_onInputClick($event)">
|
||||
</div>
|
||||
|
||||
<!-- The label content for radio control. -->
|
||||
<div class="mat-radio-label-content" [class.mat-radio-label-before]="labelPosition == 'before'">
|
||||
|
||||
@@ -152,3 +152,10 @@ $mat-radio-ripple-radius: 20px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-radio-input {
|
||||
// Move the input in the middle and towards the bottom so
|
||||
// the native validation messages are aligned correctly.
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user