Commit
Author: kalligator [387447+kalligator@users.noreply.github.com]
Committer: GitHub [noreply@github.com] Wed, 20 Sep 2023 05:46:30 +0000
Hash: 1f1f55ec7141528e3cd22f7d7c40650b3ef8d559
Timestamp: Wed, 20 Sep 2023 05:46:30 +0000 (1 year ago)

+5 -1 +/-1 browse
fix breaking centered text-alignment for td, th (#400)
fix breaking centered text-alignment for td, th (#400)

* 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 <argyle@google.com>
1diff --git a/src/extra/normalize.src.css b/src/extra/normalize.src.css
2index 3984a86..248800b 100644
3--- a/src/extra/normalize.src.css
4+++ b/src/extra/normalize.src.css
5 @@ -346,6 +346,10 @@
6 padding: var(--size-2);
7 }
8
9+ :where(:is(td,th):not([align])) {
10+ text-align: center;
11+ }
12+
13 :where(thead) {
14 border-collapse: collapse;
15 }
16 @@ -366,4 +370,4 @@
17 :where(tfoot button) {
18 padding-block: var(--size-1);
19 padding-inline: var(--size-3);
20- }
21\ No newline at end of file
22+ }