|
Rank: Advanced Member
Joined: 3/8/2011 Posts: 45
|
Hello, I'm using Stylevision 20014 and I have following issue. In my my stylesheet I'm using external CSS file, which is long but contains
Code: .flex { /* basic styling */ width: 100%; height: 100%; border: none; flex-wrap: nowrap; /* flexbox setup */ display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */ display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */ display: -ms-flexbox; /* TWEENER - IE 10 */ display: -webkit-flex; /* NEW - Chrome */ display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */ -webkit-flex-direction: row; flex-direction: row; }
Stylevision is complaining with : 'Warning - Parsing error ... unexpected token -webkit-box' and none of the formatting is applied in design mode. When I generate HTML everything is formatted as it should be and report is ok. When I generate PDF however none of the formatting is applied.
Actually the problem is in all 'display' properties, but they are intended only for HTML (browsers). Why PDF is not rendered properly? Or maybe if Stylevision says that CSS is 'no good' and entire file is ignored.
Has anybody encountered this issue?
|
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 565
|
This is because StyleVision has to read in your CSS and re-formulate it as XSL:FO style properties for PDF output. Raw CSS in and of itself means nothing in an XSL:FO context. If StyleVision encounters some "invalid" CSS it abandons parsing the whole file for this purpose. The only thing it does then is passes it on to generated HTML via a CSS @import rule, so the raw CSS still "works."
You should separate your CSS into two files and add both to your design, one which contains standard CSS which doesn't show any errors on being included in your design, and another for your special vendor-specific display styles which only mean something in a browser.
|
|
Rank: Advanced Member
Joined: 3/8/2011 Posts: 45
|
I've tested with two separate CSS files and it works as expected. Both HTML & PDF are properly formatted.
Thank you
|
|
guest |