home · contact · privacy
Fix vertical header cell orientation bug for Chromium.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 3 Jul 2020 21:47:10 +0000 (23:47 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 3 Jul 2020 21:47:10 +0000 (23:47 +0200)
enhance_table.py

index 6fe12d4282fb8c0816756673041b33e57c076a7d..d37205ee11220cc828b2e4eb75163a0eb3a2c295 100755 (executable)
@@ -156,7 +156,9 @@ table, tr, th, td { border: 1px solid black; text-align: center; }
         if sum_district == district:
             print('<th>%s</th>' % long_form)
         else:
-            print('<th class="district_name">%s</th>' % long_form)
+            # Wrap in div because the vertical orientation otherwise fails
+            # in Chromium.
+            print('<th><div class="district_name">%s</div></th>' % long_form)
     print('</tr>')
     for date in sorted_dates:
         print('<tr class="day_row">')