Page 1 of 1

CSS as External Resource

Posted: Fri Oct 16, 2015 3:52 pm
by Chris6743166

It would be great to be able to add a CSS file as an external resource (under the App Settings tab) so that changes can be made to the styling of an app after it has been published.

Is this feasible?

Chris


CSS as External Resource

Posted: Fri Oct 16, 2015 4:10 pm
by Illya Stepanov

Hi Chris -

You can add external resources in App Settings of your Appery.io project: https://devcenter.appery.io/documenta...

Image


CSS as External Resource

Posted: Fri Oct 16, 2015 4:40 pm
by Chris6743166

Hi Illya,

Thanks for the very quick reply. I had already tried what you suggested by adding the link http://mydomain.com/app/css/style.css

However, the resource appears in the html of the app pages as:

code<script type="text/javascript" src="http:&#47;&#47;mydomain&#46;com/app/css/style&#46;css"></script>/code

Instead of the correct way to reference CSS:

code<link href="http:&#47;&#47;mydomain&#46;com/app/css/style&#46;css" rel="stylesheet" type="text/css">/code

For that reason, the CSS is ineffective by this method, unless I'm missing something?

Chris


CSS as External Resource

Posted: Sat Oct 17, 2015 7:20 am
by Serhii Kulibaba

Hello Chris,

You can upload en external CSS as custom CSS, or put it inside of HTML component


CSS as External Resource

Posted: Sat Oct 17, 2015 1:15 pm
by Chris6743166

Hi Sergiy,

If I upload an external CSS as custom CSS, does the content remain editable after the app is published? In other words, if I update my external CSS, will the app styling change accordingly?

I tried adding a link to a css file using a HTML component and it worked well using this code:

code
<style type="text/css">
@import url("http:&#47;&#47;mydomain&#46;com/app/css/style&#46;css");
</style>
/code

I might just go with this solution.

Thanks,

Chris