danfickle / danfickle/openhtmltopdf

Find out computed element CSS style value

Open
#971 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.2k
Forks
423
PR merge metrics
No merged PRs in 30d

Description

Hi,

Is there a way to know (hook, subscribe, listen) before rendering (Preflight) what would be the inherited CSS styles of a inner element and somehow make on-the-fly changes to the element? For instance would somehow be possible to know that the following `img` inherits `margin-left` from `p` that will affect the maximum width I could set to the image in order to prevent it from going beyond the page right margin?

```

p { margin-left: 5pt}
@page{A4;margin:3cm 3cm 2cm 3cm}}


```

Best Regards,
Sergio Fukaya

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.