PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Css style inheritance
   PostPosted: 24 Jan 2012, 16:10 
Hi all!

When using style definitions
Code:
.element {
   width: 45%;
}
.element.full {
   width: 100%;
}


in div element as following
Code:
<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,
Kalle


  Subject: Re: Css style inheritance
   PostPosted: 27 Jan 2012, 18:41 
Hi 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,
Viktor


  Subject: Re: Css style inheritance
   PostPosted: 27 Jan 2012, 18:49 
To 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.


  Subject: Re: Css style inheritance
   PostPosted: 31 Jan 2012, 08:42 
That 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,
Kalle


  Subject: Re: Css style inheritance
   PostPosted: 06 Feb 2012, 19:08 
We've just added the support. In few days it will be available for download/test.


  Subject: Re: Css style inheritance
   PostPosted: 15 Feb 2012, 08:25 
Thanks a lot! Is this now available in the latest release?


  Subject: Re: Css style inheritance
   PostPosted: 22 Feb 2012, 18:17 
Has there been a new release with this feature added?


  Subject: Re: Css style inheritance
   PostPosted: 22 Feb 2012, 18:29 
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 :)]


  Subject: Re: Css style inheritance
   PostPosted: 24 Feb 2012, 23:09 
Just uploaded v380fx3 to the download area. Please give a try.


  Subject: Re: Css style inheritance
   PostPosted: 28 Feb 2012, 13:45 
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.



[Reply]     [ 11 posts ]  Go to page 1, 2  Next

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share