[V4.5]- Including a Hosted CSS file with another hosted file

Posted by IramK on 17-May-2017 07:07

Hello,

I have created a css hosted file that I am including on my page as a link element. The inclusion works fine, however, if the CSS file has reference to another hosted file, then this doesn't get resolved. Seems like a bug and needs fixing imo.

<link res="stylesheet" href="{!#HOSTED_FILE.asdfasdf}">

CSS hosted file:


.testElement {

background-image: url("{!#HOSTED_FILE.324234"); /* This shows as hosted file itself in the CSS properties rather than the image location*/

}

Cheers.

Iram

All Replies

Posted by Shiva Duriseati on 19-May-2017 07:06

Hi Iram,

We already have an enhancement request for this. As of now tokens used in CSS files will not get resolved to actual string values.

You can group all such elements under style tag in script component and remaining static items can be used in hosted file css.

Example:

<head>

<link rel="stylesheet" href="{!#HOSTED_FILE.nzAxih7_SYidnHJmwLAaaw}">

<style>

 body {

   background-image: url("{!#HOSTED_FILE.g2xRGa61QcGYorSQLRpcEw}");

   background-color: #cccccc;

      }

</style>

</head>

 

Regards,

Shiva

Posted by IramK on 19-May-2017 07:14

Are you planning to implement this anytime soon?

Iram

This thread is closed