HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › Css style inheritance
- This topic has 10 replies, 5 voices, and was last updated Feb 28, 2012
16:06:40 by mackelito.
-
AuthorPosts
-
January 24, 2012 at 14:10#26660
Hi all!
When using style definitions
<br /> .element {<br /> width: 45%;<br /> }<br /> .element.full {<br /> width: 100%;<br /> }
in div element as following
<div class="element full" style="border: 1px solid black;">
causes the div to gain width of 45% instead of 100%. If width attribute is removed from .element or .element.full is renamed to .full then div gains 100% width. Is this kind style inheritance unsupported in pd4ml?Thanks in advance,
KalleJanuary 27, 2012 at 16:41#28807Hi Kalle,
it depends on what you call “inheritance”. I believe we’re looking at a double-class selector issue here.That kind of selectors is generally not robust, as MSIE – for example – doesn’t evaluate them correctly either.
In MSIE, a selector like .class1.class2 {} will be evaluated as .class2{} – all elements with the class class2 will be influenced.
Likewise, in PD4ML it seems to be the first class that gets honored.So, in my opinion, the question of your post is: does PD4ML support double-class selectors?
And a robustness hint is: try to avoid them as they’re problematic with browsers as well (at least to my experience).
HTH,
ViktorJanuary 27, 2012 at 16:49#28808To be honest I even did not know, that there is such type of selectors.
We need to check if ss_css2.jar (CSS library PD4ML relies on) correctly parses double selectors. If yes, the feature implementation does not seem to be a complex task.
January 31, 2012 at 06:42#28809That was a good clarification Viktor. Double selectors are used in our base html and in the first place it was pushed directly to pd4ml and the result wasn’t as expected. By modifying the source html we get the output correct but it would be nice to get support for this 🙂
Br,
KalleFebruary 6, 2012 at 17:08#28810We’ve just added the support. In few days it will be available for download/test.
February 15, 2012 at 06:25#28811Thanks a lot! Is this now available in the latest release?
February 22, 2012 at 16:17#28812Has there been a new release with this feature added?
February 22, 2012 at 16:29#28813@mackelito wrote:
Has there been a new release with this feature added?
A look at the download page has the answer. Still 380fx2, tagged with a date before this discussion.
[Not that I wouldn’t have liked the answer to be different though :)]February 24, 2012 at 21:09#28814Just uploaded v380fx3 to the download area. Please give a try.
February 28, 2012 at 11:45#28815The positioning issues are solved for me in that version, thank you so much for the quick response!
Also thank you for the PD4ML console/GUI, it makes it so much easier to debug HTML without having to generate a PDF every time. You may want to advertise it more 🙂I have found another issue involving rather tricky LIs with bullet-dots coded as background, some positioned to the left, some to the right. I’ll start a new thread about that as soon as I have a clearer description of the issue and an isolated testcase.
February 28, 2012 at 16:06#28816@vk_iconparc wrote:
The positioning issues are solved for me in that version, thank you so much for the quick response!
Also thank you for the PD4ML console/GUI, it makes it so much easier to debug HTML without having to generate a PDF every time. You may want to advertise it more 🙂I have found another issue involving rather tricky LIs with bullet-dots coded as background, some positioned to the left, some to the right. I’ll start a new thread about that as soon as I have a clearer description of the issue and an isolated testcase.
Try to set “padding-left: 1px”
-
AuthorPosts
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.