Chris6743166
Posts: 1
Joined: Tue Mar 18, 2014 11:50 am

CSS as External Resource

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

CSS as External Resource

Hi Chris -

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

Image

Chris6743166
Posts: 1
Joined: Tue Mar 18, 2014 11:50 am

CSS as External Resource

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

CSS as External Resource

Hello Chris,

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

Chris6743166
Posts: 1
Joined: Tue Mar 18, 2014 11:50 am

CSS as External Resource

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

Return to “Issues”