Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiTableRowCell] Fix th scope="row" text alignment #7681

Merged
merged 3 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading