Skip to content

Commit 22b40da

Browse files
committed
Fix strut CSS for expander cells as well
1 parent 4a6a8e8 commit 22b40da

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/components/table/table_row_cell.styles.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ export const euiTableRowCellStyles = (euiThemeContext: UseEuiTheme) => {
1818

1919
const { mobileSizes } = euiTableVariables(euiThemeContext);
2020

21+
// Unsets the extra strut caused by inline-block display of buttons/icons/tooltips.
22+
// Without this, the row height jumps whenever actions are disabled.
23+
const hasIcons = `line-height: 1;`;
24+
2125
return {
2226
euiTableRowCell: css`
2327
color: ${euiTheme.colors.text};
2428
`,
25-
29+
isExpander: css`
30+
${hasIcons}
31+
`,
2632
hasActions: css`
27-
/* Unsets the extra strut caused by inline-block display of buttons/icons/tooltips.
28-
Without this, the row height jumps whenever actions are disabled. */
29-
line-height: 1;
33+
${hasIcons}
3034
3135
/* TODO: Move this to EuiTableCellContent, once we're further along in the Emotion conversion */
3236
.euiTableCellContent {

src/components/table/table_row_cell.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export const EuiTableRowCell: FunctionComponent<Props> = ({
132132
const styles = useEuiMemoizedStyles(euiTableRowCellStyles);
133133
const cssStyles = [
134134
styles.euiTableRowCell,
135+
isExpander && styles.isExpander,
135136
hasActions && styles.hasActions,
136137
styles[valign],
137138
...(isResponsive

0 commit comments

Comments
 (0)