Bug, beta.10 wrapped the same text
Long text between the md-checkbox tags should style via CSS and/or angular/flex-layout to a specified width and wrap within it
Long text run across the page and "outside the browser"
Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on @master): https://goo.gl/DlHd6U
StackBlitz starter (using latest npm release): https://goo.gl/wwnhMV
Put a 200 character text string inside your md-checkbox tags in your material.angular.io/components/checkbox/examples
Here is my code that spreads out beyond the browser, i.e. it displays as one line and not all of it shows:
<div fxLayout="row" fxFlex class="w800px">
<md-checkbox id="userAgreesTOS" name="userAgreesTOS" aria-labelledby="userAgreesTOS" formControlName="userAgreesTOS"
i18n="user agrees to terms of service">By checking this box, I agree with the <a href="termsOfService.php"><span class="required">Terms of Service</span></a>
that, in summary, say I am responsible for all content of this posting, and I grant limited rights for display, data analysis and the
use of cookies to make your future use of this service more automated.
</md-checkbox>
</div>
.w800px{
min-width: 400px;
max-width: 800px;
width:100%;
}
Text should wrap, and fit inside divs set by CSS
Angular 4.4.3
MD-beta.11
Windows 10
I use Angular Flex-layout
Can you provide a reproduction stackblitz/plunker? I was not able to see this same issue myself.
@josephperrott Sure, would you give me a link to a plnkr that is set up
for MD.
On Fri, Oct 6, 2017 at 7:02 PM, Joey Perrott notifications@github.com
wrote:
Can you provide a reproduction stackblitz/plunker? I was not able to see
this same issue myself.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/angular/material2/issues/7480#issuecomment-334889382,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADDSb1lvLPu3sqYQueCPgjTEkGX1KYscks5sprF0gaJpZM4PrKQM
.
--
Mike Laird
12 Arbor Creek Drive, Pittsford, New York 14534
[email protected]
". . . remembering on both sides that civility is not a sign of weakness,
and sincerity is always subject to proof. Let us never negotiate out of
fear, but let us never fear to negotiate." - John F. Kennedy
@josephperrott Here is a plnkr. I think it has all the relevant code. I tried.
@josephperrott I completed the upgrade to beta.12 and the problem persists. My other MD components work well, thank you.
I copied the checkbox from the MD checkbox documentation, upgraded it to mat-checkbox, added a lot of text, styled it as shown above, placed it inside my reactive form and outside my form - and the long text spreads out across the page and 'outside' the browser (if it could be seen) in all locations/instances.
I'm surprised you cannot reproduce the problem. Try the above. Or show me a working plnkr with the long text wrapped.
Confirming, having same issue. Mat-checkbox gets out of mat-card or any other container ignoring width.
I may be over-simplifying this.. but the following works for me:
.mat-checkbox-label {
white-space: normal;
}
@jasonhendee , Thanks, but it does not work for me. Even if it did, it should not be necessary to specifically set white-space in order to get the text between tags to behave properly, i.e., respond to width
I am also having this issue
@jasonhendee thank you, it works
Closing since this is working as intended; the intent is that checkbox labels do not wrap by default and can be overridden via css.
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._
Most helpful comment
I may be over-simplifying this.. but the following works for me:
.mat-checkbox-label { white-space: normal; }