Page 1 of 1

Url of builtin image from custom css

Posted: Mon Oct 26, 2015 1:12 pm
by Patrik
Hi,

within my custom css files I'd liketo be able to refer to some builtin images like 'editContent.gif'. But I can't know where the custom framework will be located relative to the oxygen folder so I can't use a relative path. Is there any way to use something like url('${OXYGEN_INSTALL}/lib/oxygen.jar/images/editContent.gif')?

If not, would it be ok to just copy the required images to an image folder in my custom framework? It will be shared as open source.

Patrik

Re: Url of builtin image from custom css

Posted: Mon Oct 26, 2015 1:25 pm
by Radu
Hi Patrik,

You can try in the CSS's an URL which starts with "/" like:

Code: Select all

 url('/images/editContent.gif')
That should force the image to be resolved to the main Oxygen JAR.
But we do not consider that these image file names are API so at some point in the future we might change the file names, for example save the image as PNG instead of ".gif".
So maybe it would be better if you would copy that image from the JAR to your framework and refer to it directly.

Regards,
Radu

Re: Url of builtin image from custom css

Posted: Mon Oct 26, 2015 1:32 pm
by Patrik
Hi Radu,

thanks for the quick answer. Using an URL starting with '/'did not work. He was looking fot the file 'C:/images/editContent.gif'. So I copied the required images into my framework. (Just wasn't sure if there are any copyright issues with your images.)

Patrik

Re: Url of builtin image from custom css

Posted: Mon Oct 26, 2015 1:39 pm
by Radu
Hi Patrik,

As long as you are using the image with an Oxygen framework there are not copyright issues.

Regards,
Radu