components icon indicating copy to clipboard operation
components copied to clipboard

md-checkbox will distortion when width is very small

Open zealitude opened this issue 10 years ago • 6 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

md-checkbox with long text keep square shape when container element width is very small

What is the current behavior?

md-checkbox with long text shape distort when container element width is very small

Which versions of Angular, Material, OS, browsers are affected?

Material 2.0.0-alpha.10 Google Chrome Version 54.0.2840.99 m

zealitude avatar Nov 14 '16 09:11 zealitude

Would you please provide plunkr for this problem? thanks

csabattilas avatar Nov 14 '16 14:11 csabattilas

@zealitude Please provide a reproduction or steps to reproduce.

jelbourn avatar Nov 14 '16 23:11 jelbourn

Hi all, you can reproduce the bug from the Readme md-checkbox demo link https://plnkr.co/edit/P7qce8lN9n2flS6kBhDy?p=preview just try to change the preview windows (right hand side view) width

ps. I found that the bug will occur when one line text become two lines in very small width.

zealitude avatar Nov 14 '16 23:11 zealitude

@zealitude @jelbourn A quick fix would be to set the md-checkbox-frame's and the md-checkbox-background's width to 18px. Also set the label's white-space to nowrap. There is not enough space so the browser tries to rearrange the children of the checkbox. I'll try to see I can find a better solution for this.

csabattilas avatar Nov 14 '16 23:11 csabattilas

This is a duplicate of issue #1097. It's fixed on current master.

tinayuangao avatar Nov 15 '16 01:11 tinayuangao

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.