Components: Inconsistent checkbox styles

Created on 2 Nov 2018  路  4Comments  路  Source: angular/components

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Consistent checkbox style

What is the current behavior?

mat-checkbox
image

mat-tree
image

mat-selection-list
image

mat-selection-list checkbox styles are slightly inconsistent. Only obvious when side by side with another source.

What are the steps to reproduce?

See:
https://material.angular.io/components/checkbox/overview
vs
https://material.angular.io/components/list/overview#selection-lists

What is the use-case or motivation for changing an existing behavior?

Consistency

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

Angular 7, Material 7, Linux, Chrome/Firefox

Is there anything else we should know?

Nope. Super low priority, but worth mentioning.

P5 materiacheckbox

Most helpful comment

But both checkboxes are used in forms, and when they are used within the same form, it's extremely noticeable. Also, pseudo-checkboxes do not support the necessary features that would allow us to replace actual checkboxes with them (such as indeterminate state.) In our case, we have a multi-select with a select all feature, and it looks ridiculous now because of this change.

select

All 4 comments

The reason is that we have two checkboxes: mat-checkbox that comes with all the behavior, animations, accessibility etc. and mat-pseudo-checkbox which is CSS-only and intended only for presentation. After we reduced the sizes of checkbox, they ended up rendering slightly differently, because one uses SVG and the other one is pure CSS.

But both checkboxes are used in forms, and when they are used within the same form, it's extremely noticeable. Also, pseudo-checkboxes do not support the necessary features that would allow us to replace actual checkboxes with them (such as indeterminate state.) In our case, we have a multi-select with a select all feature, and it looks ridiculous now because of this change.

select

i've got the same effect as @thomas-parrish but in a simple mat-selection-list without doing nothing special

Yea, it's looking worse and worse, not the checkboxes are virtually impossible to look at, there has to be a better way, then completely separate components, that look the same but doing completely different things
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theunreal picture theunreal  路  3Comments

constantinlucian picture constantinlucian  路  3Comments

michaelb-01 picture michaelb-01  路  3Comments

shlomiassaf picture shlomiassaf  路  3Comments

Hiblton picture Hiblton  路  3Comments