CSS String Variables
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 93
- Joined: Tue Oct 30, 2018 9:47 pm
CSS String Variables
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!
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!
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: CSS String Variables
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
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
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service