Skip to content

Commit

Permalink
New: (Fixes liferay#1029) Table Autofit added `.table-cell-expand-sma…
Browse files Browse the repository at this point in the history
…ll`, `.table-cell-expand-smaller`, and `.table-cell-expand-smallest` to help size columns better

New: (liferay#1020) Table addd options to configure `$table-cell-expand-small-max-width`, `$table-cell-expand-small-width`, `$table-cell-expand-smaller-max-width`, `$table-cell-expand-smaller-width`, `$table-cell-expand-smallest-max-width`, `$table-cell-expand-smallest-width`
  • Loading branch information
pat270 committed Jun 19, 2018
1 parent 27df309 commit 7924b0b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/clay-css/src/scss/components/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,24 @@ th {
.table-cell-expand {
@extend %table-cell-expand;
}

.table-cell-expand-small {
max-width: $table-cell-expand-small-max-width;
width: $table-cell-expand-small-width;
word-wrap: break-word;
}

.table-cell-expand-smaller {
max-width: $table-cell-expand-smaller-max-width;
width: $table-cell-expand-smaller-width;
word-wrap: break-word;
}

.table-cell-expand-smallest {
max-width: $table-cell-expand-smallest-max-width;
width: $table-cell-expand-smallest-width;
word-wrap: break-word;
}
}

.table-nowrap {
Expand Down
9 changes: 9 additions & 0 deletions packages/clay-css/src/scss/variables/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ $table-quick-action-menu-hover-bg: $table-hover-bg !default;

$table-cell-expand-min-width: 12.5rem !default; // 200px

$table-cell-expand-small-max-width: 12.5rem !default; // 200px
$table-cell-expand-small-width: 25% !default;

$table-cell-expand-smaller-max-width: 12.5rem !default; // 200px
$table-cell-expand-smaller-width: 15% !default;

$table-cell-expand-smallest-max-width: 12.5rem !default; // 200px
$table-cell-expand-smallest-width: 10% !default;

// Table Bordered

$table-bordered-border-width: $table-border-width !default;
Expand Down

0 comments on commit 7924b0b

Please sign in to comment.