Forum How do I...?

Scaling Illustrator SVG in CSS Background

afingret
I am successfully loading an Adobe Illustrator-generated svg file as a css background like this:

background: url(../images/generalBg.svg) no-repeat 0pt 0pt;

Easy, but Prince renders the svg smaller than intended/created. Seeing as there is no "background-size" property, is there any way to control the scale of my svg background?
mikeday
There is a prince-background-image-resolution property, but this doesn't apply to SVG images yet. Would this solve the problem, if it did apply? Also, does the SVG image have specified width/height attributes?
afingret
Hi Mike,

Perhaps prince-background-image-resolution would have the desired effect.

I suppose the first thing I would try is changing it to 72dpi and/or 96dpi, as I am suspicious that this may be the culprit. The svg file I am outputting does have width and height, but it's in pixels. Switching to inches, points or percentages doesn't seem to render.

A prince-background-image-size property seems like it would be the most "accurate" thing to use, but I don't know whether it is practical or easy to create new properties.