Hello,
we use Aspose.Words to convert HTML files to PDF and DOCX.
The HTML files, we are converting use custom CSS properties (https://developer.mozilla.org/en-US/docs/Web/CSS/--*) inserted by a third-party, but these custom properties (or “CSS variables”) are not properly interpreted by the Aspose conversion.
The following example HTML code can be used to reproduce the problem:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
:root {
--color: red;
}
</style>
</head>
<body>
<p style="color: var(--color);">this should be red</p>
</body>
</html>
The paragraph this should be red
should be displayed in red, due to the color being defined as red in the variable --color
. But in the converted PDF file, the text is black.