Page 1 of 1

CSS String Variables

Posted: Sat Oct 19, 2019 7:04 am
by jmorales
Hi,
I'm trying to use a string variable so as not to repeat the same text in multiple places in the CSS. The code looks like this:

:root{
--footer-text: 'Confidential - Proprietary Information - For Use By Authorized Company Clients Only. Do Not Distribute.';
}

@page {
@bottom-center {
content: var(--footer-text);
}
}

Unfortunately, the bottom center text comes out blank when I transform my document to PDF. Yet it works OK if I enter the text directly, as

@bottom-center {
content: "Confidential - Proprietary Information - For Use By Authorized Company Clients Only. Do Not Distribute.";
}

Have I got the syntax wrong, or am I attempting something that is not supported? Thanks!

Re: CSS String Variables

Posted: Mon Oct 21, 2019 2:50 pm
by Dan
Hello,
The PDF processor does not support the CSS variables, but it supports LESS (http://lesscss.org/). The extension of the customization file should be .less.
Many regards,
Dan

Re: CSS String Variables

Posted: Mon Oct 21, 2019 9:19 pm
by jmorales
Thanks, Dan! That looks like it does exactly what we need.