angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.23k stars 6.7k forks source link

Checkbox moves when clicked if in particular CSS structure #9526

Open andrewseguin opened 6 years ago

andrewseguin commented 6 years ago

When the checkbox is nested in a container with hidden overflow, and that container's parent is a flex container with align-items center, the checkbox will move up when clicked:

https://stackblitz.com/edit/angular-zc9dkd?file=app/checkbox-overview-example.html

Click the checkbox and notice that it is now halfway hidden

jcen947pvfc

This was discovered when using checkboxes in cells in the table https://github.com/angular/material2/issues/8517

tinayuangao commented 6 years ago

I think this is because our ripple.

A workaround is adding

  display: inline-flex;
  margin: 15px; // ripple 

to .mat-checkbox.

5earle commented 6 years ago

Good day. i am a student studying open source at Seneca college, and would like to take a go at this project if it is still available