Skip to content

CSS background:linear-gradient(red,yellow); not working #439

@rja907

Description

@rja907

I just tried to use this library to generate PDFs using HTML templates.
Here is some code:
CSS

.thank-you-background {
  height: 20px;
  background: linear-gradient(red, yellow);
}

HTML

<div class="thank-you-background">
   <p><strong>THANK YOU FOR YOUR BUSINESS!</strong></p>
</div>

I have also tried using background-image: linear-gradient(red, yellow); but that gave an explicit error saying com.openhtmltopdf.css-parse WARNING:: (./#inline_style_1) Value for background-image must be an identifier or a URI at line 76. Skipping declaration..

The HTML renders it correctly but the library does not show the gradient background.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions