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

[Table] Sortable column (aria-sort) with hAlign="right" is aligned to the left #1321

daniel-rodrigue opened this issue Dec 26, 2021 · 0 comments


Copy link

When using aria-sort with hAlign="right", the column is left-aligned. Without the aria-sort, the cell is right-aligned as expected.

Steps to reproduce the behavior:

      <TableCell hAlign="right" aria-sort={"col1" === sortKey ? sortOrder : "none"} onClick={...}>Column 1</TableCell>

Expected behavior
With the "aria-sort" and hAlign="right", the cell should be right-aligned.

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS
  • Browsers: chrome, edge, safari & firefox
  • Version: all latest browsers

Additional context
Looking at the CSS, there's a width: 100% in the cell's button that seems to push its content to the left.

.rmd-table-cell__child {
    padding-left: var(--rmd-table-cell-h-padding, 1rem);
    padding-right: var(--rmd-table-cell-h-padding, 1rem);
    align-items: center;
    color: inherit;
    font: inherit;
    height: 100%;
    width: 100%;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants