A cascading nesting of objects is identified via an image relative to the level of nesting:
#nestedlist, #nestedlist li {
font-size: 12px;
list-style-type: none;
}
#nestedlist ul {
list-style-image: url("/yellow_dark.png");
}
/* UL Layer # Rules based on quantity_of_ul */
#nestedlist ul ul {
list-style-image: url("red_base.png");
}
#nestedlist ul ul ul {
list-style-image: url("/green_light.png");
}
etc.
this renders properly in the browser, notwithstanding the location of the image, in the public directory or in the assets directory. However wicked PDF requires an absolute path for images and cannot handle the above; it will return a blank if list-style-type: none; or a black bullet if that is not specified. attempted to use list-type: square; but that, alas, does not take colour options.
How could a css file be cast to provide absolute urls for images in a precompiled css file invoked by the pdflayout for wicked_pdf?
You have to configure
asset_host, because, when it is not specificly set wickedpdf will use localfile://urls, which didn't work for me:https://github.com/mileszs/wicked_pdf/blob/2.6.3/lib/wicked_pdf/wicked_pdf_helper/assets.rb#L131
wicked_pdf_stylesheet_link_taghelper now outputs this:You could also try using
asset_url("circle.svg")explicitly to get a full url orwicked_pdf_asset_base64("circle.svg")to inline a data url.