[GNC] CSS Troubleshooting for Transaction reports

Andreas Vyrides vyrasv at gmail.com
Mon Feb 22 11:40:09 EST 2021


Dear Sir,

I hope this email find you well. I have been having some issues with 
setting up transaction reports the way I want them to look.

I have been able to get the printed version of the report (which is my 
main concern) the way I want it, but I have not been able to implement 
some of the more "advanced" modifications present in other HTML style 
sheets such as applying different colours to "Subheadings/Subtotals" and 
"Sub-subheading/total".

Please find attached the CSS that I currently use :

"

@media (prefers-color-scheme: dark) {
     body {
         color: #000; background-color: #fff;
     }
}

html, body {
     height: 30vh;
     margin: 0;
     font-family: Arial, sans-serif;
     font-size: 20pt;

}

body, p, table, tr, td, a, th {
     vertical-align: top;
}

h3 {
     font-size: 15pt;
     font-weight: bold;
}

a {
     font-style: italic;
}

/* table elements as follows */
td, th {
     padding:2px;
}

tr.alternate-row {
     background: #ffffff
}

tr {
     page-break-inside: avoid !important;
}

td, th {
     border-color: grey
}

td.total-number-cell, td.total-label-cell, td.centered-label-cell {
     font-size: 18pt;
     font-weight: bold;
}

th.column-heading-left {
     text-align: left;
}

td.centered-label-cell, th.column-heading-center {
     text-align: center;
}

td.number-header, th.column-heading-right, td.number-cell, 
td.total-number-cell {
     text-align: right;
}

td.neg {
     color: red;
}

td.number-cell, td.total-number-cell, td.anchor-cell, td.date-cell {
     white-space: nowrap;
}

td.highlight {
     background-color: #e1e1e1
}

@media print {
     html, body, p, table, td, a, th, h3, td.total-number-cell, 
td.total-label-cell, td.centered-label-cell {
     font-family: Arial, sans-serif;
     font-size: 8pt;
}

td, th {
     padding:1px;
}

"

I look forward to suggestions and modifications.

Kind Regards

Andreas Vyrides





More information about the gnucash-user mailing list