While printing a page from the Koha STAFF interface all last columns of tables use **bold** font while on screen they use normal font. This can be seen e.g. when running reports to feed a notice. This happens due to the following CSS defined for _print_: ``` td:last-child, th:last-child { background-color: #E9E9E9; border-bottom: 1px solid #CCCCCC; border-left: 0; border-right: 0; border-top: 0; font-size: 14px; font-weight: bold; padding: 5px 5px 5px 5px; } ``` This assigns `font-weight: bold` to all `last-child`s of `td`.
The easiest way to reproduce is a custom html page that holds a real table. 1. Go to `Home / Tools / Additional content / Pages` 2. Select `Add new entry using text editor` 3. Add the following html ```html <table> <tbody> <tr> <td>col 11</td> <td>col 12</td> </tr> <tr> <td>col 21</td> <td>col 22</td> </tr> </tbody> </table> ``` 4. Save 5. Use the `Staff`-URL from `Additional content: Pages` to open the page in a new tab 6. Select `File / Print` (or fire up the dev console and apply the Print-css) 7. The entries `col 12` and `col 22` appear in bold face.
Created attachment 175603 [details] [review] Bug 38711: Wrong font-weight in tables during printing from STAFF interface Fix last columns of tables to be printed in `bold`. This affects various functions of Koha e.g. Notices and Slips, Pages etc. 1. Go to `Home / Tools / Additional content / Pages` 2. Select `Add new entry using text editor` 3. Add the following html ```html <table> <tbody> <tr> <td>col 11</td> <td>col 12</td> </tr> <tr> <td>col 21</td> <td>col 22</td> </tr> </tbody> </table> ``` 4. Save 5. Use the `Staff`-URL from `Additional content: Pages` to open the page in a new tab 6. Select `File / Print` (or fire up the dev console via F12 and apply the Print-css) 7. The entries `col 12` and `col 22` appear in bold face. 8. Apply the patch 9. Reload the page 10. The entries `col 12` and `col 22` appear in normal font. Sponsored-by: Deutsches Elektronen-Synchrotron DESY, Library
Created attachment 175907 [details] [review] Bug 38711: Wrong font-weight in tables during printing from STAFF interface Fix last columns of tables to be printed in `bold`. This affects various functions of Koha e.g. Notices and Slips, Pages etc. 1. Go to `Home / Tools / Additional content / Pages` 2. Select `Add new entry using text editor` 3. Add the following html ```html <table> <tbody> <tr> <td>col 11</td> <td>col 12</td> </tr> <tr> <td>col 21</td> <td>col 22</td> </tr> </tbody> </table> ``` 4. Save 5. Use the `Staff`-URL from `Additional content: Pages` to open the page in a new tab 6. Select `File / Print` (or fire up the dev console via F12 and apply the Print-css) 7. The entries `col 12` and `col 22` appear in bold face. 8. Apply the patch 9. Reload the page 10. The entries `col 12` and `col 22` appear in normal font. Sponsored-by: Deutsches Elektronen-Synchrotron DESY, Library Signed-off-by: David Nind <david@davidnind.com>
QA by RM
Pushed for 25.05! Well done everyone, thank you!
Nice work everyone! Pushed to 24.11.x for 24.11.03