Open ghost opened 7 years ago
It's probably just from where whomever was doing the original build saw all the examples in the specification were largely numeric. There isn't a decided rhyme-or-reason to it. For Material Components for Web's table we should probably just let text be the default and numeric be the modifier.
Components for Web's table we should probably just let text be the default and numeric be the modifier.
Or use class on <table>
to configure the cell default behavior: numeric or text.
Or use class on
<table>
to configure the cell default behavior: numeric or text.
Something like:
.mdl-data-table.mdl-data-table-default-non-numeric td {
text-align: left;
}
and
<table class="mdl-data-table mdl-js-data-table mdl-data-table-default-non-numeric">
...
Hi,
Are tables expected to hold numeric data generally? I saw that the MD guidelines recommend right align for numeric but left align for text. With this library by default it behaves for numeric data, one has to explicitly apply class mdl-data-table__cell--non-numeric for text, so I'm wondering why the default is not the other way around. In my case most of my tables hold text and I'm having to litter the code with the explicit classing. I wonder if this is not most peoples use case too? Thanks in advance.