Skip to content

CSS using var() does not render when loading HTML to PDF #60

@martsve

Description

@martsve

Describe the bug
The following HTML does not result in a green background div. Only the bottom border is applied.

<html><head>
<style>
.alert {
    --bg: #d1e7dd;
    background-color: var(--bg);
    border-bottom: 1px solid black;
}
</style>
</head><body>
<div class='alert'>
  This box should be green (if VAR works) with a border bottom (if css applied).
</div></body></html>

To Reproduce

var document = new Document("index.hml");
document.Save("out.pdf", SaveFormat.Pdf);

Expected behavior
The box should be green with a border bottom.

Screenshots
Using Var():
bilde

Setting the background color without Var():
bilde

Desktop (please complete the following information):

  • OS: Windows
  • Version: Aspose.PDF v24.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions