mat-radio-button and mat-checkbox don't line wrap
See original GitHub issueBug, feature request, or proposal:
Proposal: change <mat-radio-button>
or <mat-checkbox>
to line-wrap its contents by default or add an option.
What is the expected behavior?
I can put a text into a <mat-radio-button>
or <mat-checkbox>
that is longer than what fits into the viewport.
What is the current behavior?
The content in a <mat-radio-button> or <mat-checkbox> does not line wrap. If you have a lot of text in a <mat-checkbox> it gets cut at the end.
A workaround would be
<mat-radio-button><span style="white-space: normal;">{{mylongtext}}</span></mat-radio-button>
What are the steps to reproduce?
https://stackblitz.com/edit/angular-material2-issue-uaeetd?file=app/app.component.html
What is the use-case or motivation for changing an existing behavior?
I have a pretty narrow window and need to put checkboxes and radio buttons in there.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
I think all of them.
Is there anything else we should know?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:18
- Comments:9 (1 by maintainers)
Top Results From Across the Web
How can I toggle between mat-checkbox or mat-radio-button ...
There are several problems. First, calling multipleAnswer only inside ngOnInit sets this boolean variable only once at begining, it should be inside ...
Read more >Radio button | Angular Material
The radio-button label is provided as the content to the <mat-radio-button> element. The label can be positioned before or after the radio-button by...
Read more >Configurable checkbox - StackBlitz
<mat-checkbox class="example-margin" [. (ngModel)]="checked">Checked</. mat-checkbox> ... <mat-radio-group [(ngModel)]="align">. <mat-radio-button.
Read more >Easy Angular Testing – UI Elements – Select, Radio Button ...
<<mat-checkbox> provides the same functionality as a native ... Like we do in the select above, we grab our mat-radio-button data from a ......
Read more >@abt-desk/realogy-mat-theme - npm
Use a color of primary to ensure it stands out from content. If you would like the floating action button to contain children,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
=== styles.css ===
.mat-checkbox-layout { white-space: normal !important; }
.mat-radio-label { white-space: normal !important; }
Redefine that style: