David-Mulder / paper-datatable

A material design implementation of a data table.
GNU General Public License v3.0
237 stars 92 forks source link

Adding mixins for paper checkbox size #136

Open VinodLouis opened 6 years ago

VinodLouis commented 6 years ago

Although paper datatable has the mixins --paper-datatable-column-header and --paper-datatable-cell through which we can customize header and cell styles eg: padding/height etc, but in case of selectable checkbox this fails as the height of the row increases to adjust the checkbox size.

However checkbox size in itself is a mixin from paper-checkbox(--paper-checkbox-size) but here --paper-datatable-checkbox and --paper-datatable-header-checkbox don't help because of the nested mixin issue as addressed in polymer#3746.

Hence adding two new mixin variable as --paper-datatable-header-checkbox-size and --paper-datatable-checkbox-size so that checkbox size can be passed. If variable not passed it will be default by paper checkbox as 18px. Also adjusting the size of the partialSelectionContainer class to adjust as the checkbox provided size.

A very straight-forward and simple pull request but helps in styling as height 56px is too much of real-estate for a field in custom styling. Hope it helps.