Skip to content

Commit dd75237

Browse files
authored
Fix table header text-align (#30084)
Fix regression from #30047. Apparently tables have certain user-agent styles that center inside `<th>` etc. Restored the original fomantic rules for these. Before: <img width="1332" alt="Screenshot 2024-03-25 at 21 59 33" src="https://github.com/go-gitea/gitea/assets/115237/e06a5509-b505-4752-9b6e-91d5ed49f61d"> After: <img width="1330" alt="Screenshot 2024-03-25 at 21 59 40" src="https://github.com/go-gitea/gitea/assets/115237/6444817f-dd61-4a1e-a8b3-959c2780148d">
1 parent 08aec2c commit dd75237

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web_src/css/modules/table.css

+4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
}
2424
.ui.table > thead,
2525
.ui.table > tbody {
26+
text-align: inherit;
2627
vertical-align: inherit;
2728
}
2829

2930
.ui.table > thead > tr > th {
3031
background: var(--color-box-header);
32+
text-align: inherit;
3133
color: var(--color-text);
3234
padding: 6px 5px;
3335
vertical-align: inherit;
@@ -52,6 +54,7 @@
5254
.ui.table > tfoot > tr > td {
5355
border-top: 1px solid var(--color-secondary);
5456
background: var(--color-box-body);
57+
text-align: inherit;
5558
color: var(--color-text);
5659
padding: 0.78571429em;
5760
vertical-align: inherit;
@@ -78,6 +81,7 @@
7881
.ui.table > tbody > tr > td {
7982
border-top: 1px solid var(--color-secondary-alpha-50);
8083
padding: 6px 5px;
84+
text-align: inherit;
8185
}
8286
.ui.table > tr:first-child > td,
8387
.ui.table > tbody > tr:first-child > td {

0 commit comments

Comments
 (0)