Skip to content

Commit

Permalink
fix: text alignement in cell renderers
Browse files Browse the repository at this point in the history
Dates (in any format) should ideally be left-aligned inside a data table column.

A rule of thumb is: integers should be right aligned, while other types of data should be left aligned.

The default alignment for most types of data is left alignment -- this helps make the data easily scannable, readable and comparable.

https://ux.stackexchange.com/questions/117685/in-tables-should-date-time-year-in-table-be-left-or-right-aligned#:~:text=Dates%20(in%20any%20format)%20should,data%20should%20be%20left%20aligned.
  • Loading branch information
veith committed Jun 3, 2022
1 parent 4415b98 commit 749483f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/typerenderer/cell-google-protobuf-timestamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class CellGoogleProtobufTimestamp extends LitElement {
return css`
:host {
display: block;
text-align: right;
white-space: nowrap;
}
Expand Down
1 change: 0 additions & 1 deletion src/typerenderer/cell-google-type-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class CellGoolgeTypeColor extends LitElement {
return css`
:host {
display: block;
text-align: right;
}
:host([hidden]) {
Expand Down
1 change: 0 additions & 1 deletion src/typerenderer/cell-google-type-date.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export class CellGoogleTypeDate extends LitElement {
return css`
:host {
display: block;
text-align: right;
white-space: nowrap;
}
Expand Down
1 change: 0 additions & 1 deletion src/typerenderer/cell-google-type-timeofday.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class CellGoogleTypeTimeofday extends LitElement {
return css`
:host {
display: block;
text-align: right;
white-space: nowrap;
}
Expand Down

0 comments on commit 749483f

Please sign in to comment.