Project

General

Profile

CSS Priority in WPdfRenderer

Added by Markus Raabe over 7 years ago

I tried WPdfRenderer and had the effect that the font size could not be changed within the document. The reason was a first global setting in CSS.

If I have:

body { font-size: 10px; }

.small { font-size: 8px; }

the class 'small' has no effect. Always the font-size from body is used. If the declaration for body is removed, the class style works.

The same problem for tables. If a 'center' alignment is defined globally the alignment cannot be changed to 'left' for one column.

How is the style selected for WPdfRenderer? Is the first declaration always used? Or is there some way to override it?