CSS Functions
Supported CSS functions include:
- attr()
- It is used to retrieve the value of an attribute of the selected element and use it in
the style sheet. The
attr()function can be used with any CSS property. See more details: here. - url()
- The
<url>CSS data type denotes a pointer to a resource, such as an image or a font. It has no proper syntax and can only be expressed through theurl()functional notation. URLs are used in numerous CSS properties, such asbackground-image,cursor,@font-face, andlist-style-image. - leader()
- Used to fill a space with a pattern.
elem:before { content: "A" leader(".") "B"; display:block; }The text "A" and "B" should be at the left and right sides of the page, with a line full of dots between them. See Creating a Table of Contents (TOC) for more examples. - string()
- Retrieves the value of a string-set. See Headers and Footers for use-cases.
- content()
- Retrieves the text content from the current element. Used in a string-set definition. See Headers and Footers for use-cases.
- oxy_ … ()
- This is a collection of extension functions that are only recognized by
Oxygen products. They can be used to process strings, do mathematical
calculations, execute XPath queries over the document, and retrieve text from the
document. See the full list: here.
The following example counts the number of words from a paragraph (including tracked changes) and displays the result in front of it:
p:before{ content: concat("|Number of words:", oxy_xpath( "count(tokenize(normalize-space(string-join(text(), '')), ' '))", processChangeMarkers, true), "| "); }