Skip to content

Commit

Permalink
fix(tables): preserve table row heights with icons and thumbnails (#1674
Browse files Browse the repository at this point in the history
)

Co-authored-by: Julien Déramond <julien.deramond@orange.com>
Co-authored-by: louismaxime.piton <louismaxime.piton@orange.com>
  • Loading branch information
3 people authored Apr 5, 2023
1 parent 2296cac commit 970fcaa
Show file tree
Hide file tree
Showing 4 changed files with 476 additions and 444 deletions.
7 changes: 7 additions & 0 deletions scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
width: $spacer * 2;
max-width: $spacer * 2;
}

// Use negative margins on icons in tables to preserve row height
svg,
img {
margin-top: $table-cell-icon-margin-top;
margin-bottom: $table-cell-icon-margin-bottom;
}
// End mod
}

Expand Down
2 changes: 2 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,8 @@ $table-cell-padding-x: $spacer * .5 !default; // Boosted mod
$table-cell-padding-y-sm: .5625rem !default; // Boosted mod
$table-cell-padding-x-sm: $table-cell-padding-x !default; // Boosted mod

$table-cell-icon-margin-top: -.75rem !default; // Boosted mod
$table-cell-icon-margin-bottom: -.625rem !default; // Boosted mod
$table-cell-vertical-align: top !default;
$table-line-height: 1.25 !default; // Boosted mod

Expand Down
Loading

0 comments on commit 970fcaa

Please sign in to comment.