Skip to content

Commit

Permalink
fix breaking centered text-alignment for td, th (#400)
Browse files Browse the repository at this point in the history
* fix breaking centered text-alignment for td, th

I noticed that :where(td,th) has text-align: left set, which messes things up when td or th has align="center" in their html tag. 

I fixed this issue, but I think it would be better to remove the alignment from :where(td,th) altogether, because it might also cause problems for right-to-left users.

* Update src/extra/normalize.src.css

---------

Co-authored-by: Adam Argyle <[email protected]>
  • Loading branch information
kalligator and argyleink authored Sep 20, 2023
1 parent b26d4e4 commit 1f1f55e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extra/normalize.src.css
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@
padding: var(--size-2);
}

:where(:is(td,th):not([align])) {
text-align: center;
}

:where(thead) {
border-collapse: collapse;
}
Expand All @@ -366,4 +370,4 @@
:where(tfoot button) {
padding-block: var(--size-1);
padding-inline: var(--size-3);
}
}

0 comments on commit 1f1f55e

Please sign in to comment.