Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Add a gradient to tables for PDF

Isaac Steele September 9, 2019

I'm trying to tweak the PDF output of our docs, using Space Tools > Look and Feel > PDF Export to tweak the CSS sheet (that I inherited from the previous person in my role).

I'd like to add a colour gradient to our table headers, but I'm not sure if it's supported by Confluence.

This is the table section of our PDF Export Stylesheet, and it's a little old:

/* ============================ Table Config ======================== */
table.confluenceTable {
margin-top: 10px !important;
margin-left: 10px !important;
width: 645px;
background-color: 1px solid #FCEDC7 !important;
border:1px solid #FDEBC1 !important;
font-size: 8pt !important;
table-layout:auto !important;
}
table.confluenceTable p {
font-size: 8pt !important;
line-height: 100% !important;
}
table.confluenceTable, table.confluenceTable td {
background-color: 1px solid #FCEDC7 !important;
border:1px solid #FDEBC1 !important;
font-size: 8pt !important;
}
table.confluenceTable td.confluenceTd.highlight, th.confluenceTh {
background-color: #FDE6B0 !important;
border: 1px solid #FDEBC1 !important;
font-size: 8pt !important;
}
table.confluenceTable td.confluenceTd.highlight p, th.confluenceTh p {
background-color: #FDE6B0 !important;
font-size: 8pt !important;
}
table.confluenceTable td.confluenceTd.highlight a, table.confluenceTable td.confluenceTd.highlight a, th.confluenceTh a {
color: #000!important;
font-size: 8pt !important;
}

(Note, I've never really used CSS directly before, so if there's a redundancy in there, I'd gladly take some recommendations for cleaning it up).

Right now, I am able to change the background and border colour without any issues. For example, going from background-color: #FCEDC7 to background-color: ##2C22BD works just fine, and it shows up fine in the PDF export.

However, I'm not getting any results using background: linear-gradient(0.25turn, blue, magenta).

I've also tried background-image and background-color with no luck.

Can anyone confirm that Confluence doesn't support this, or that I'm just doing it wrong?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events