Skip to content

Commit

Permalink
[EuiTableRowCell] Fix th scope="row" text alignment (#7681)
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen authored Apr 12, 2024
1 parent 8df8aef commit 34d83b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/upcoming/7681.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Bug fixes**

- Fixed a visual text alignment regression in `EuiTableRowCell`s with the `row` header scope
1 change: 1 addition & 0 deletions src-docs/src/views/tables/auto/auto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ export default () => {
tableCaption="Demo of EuiBasicTable's table layout options"
items={users}
columns={columns}
rowHeader="firstName"
tableLayout={tableLayout === 'tableLayoutAuto' ? 'auto' : 'fixed'}
/>
</>
Expand Down
4 changes: 3 additions & 1 deletion src/components/table/table_row_cell.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
euiFontSize,
euiTextTruncate,
logicalCSS,
logicalTextAlignCSS,
} from '../../global_styling';

import { euiTableVariables } from './table.styles';
Expand All @@ -32,8 +33,9 @@ export const euiTableRowCellStyles = (euiThemeContext: UseEuiTheme) => {
color: ${euiTheme.colors.text};
`,
rowHeader: css`
/* Unset the automatic browser bolding applied to [th] elements */
/* Unset the automatic browser bolding and center alignment applied to [th] elements */
font-weight: ${euiTheme.font.weight.regular};
${logicalTextAlignCSS('left')}
`,
isExpander: css`
${hasIcons}
Expand Down

0 comments on commit 34d83b8

Please sign in to comment.