CSS Class not recognized.

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
12/21/2008 3:19:59 PM
Gravatar
Total Posts 41

CSS Class not recognized.


Joe,

When I open the complied version of 2.2.7.8 in VS2008 and work with the layout.master in most of the existing skins several of the CSS classes don't seem to be recognized. For instance, "topnav" is listed as "not defined" so when I try to make changes to it... it doesn't work.

I'm working with the compiled version because I'm very new to this and have only work with MS's ASP.net personal starter kit and your source code version looks way over my head.

Rob

Ok, so after playing around I found that if I restart IIS the changes are applied.

 

12/22/2008 7:06:20 AM
Gravatar
Total Posts 18439

Re: CSS Class not recognized.

Hi Rob,

Even when working with the source code you will see warnings about unknown css classes. Its because at design time its not using the real skins but at runtime it is. At runtime, the skin is retrieved from a site specific folder, Data/Sites/[SiteID]/skins/[skinname], but the visual studio designer has no way of knowing this. You can safely ignore warnings about unkown css classes. What matters is that they are there at runtime.

When you make changes to a skin you need to clear the server cache by recycling the app (touching Web.config is sufficient), and you need to clear the browser cache as well, in order to see your changes. I will look into adding a config option to disable at least the server side caching as this would make the desing process less tedious. Right now its optimal for when your skin is finished, but I suppose its a little more hassle while working on a skin because the heavy caching makes you think your changes had no effect.

Best,

Joe

12/23/2008 6:04:26 AM
Gravatar
Total Posts 18439

Re: CSS Class not recognized.

Hi Rob,

To make it easier, yesterday I updated the 2.2.8.1 release with some new config settings to make it easy to disable the cache while you are designing. If you downloaded the 2.2.8.1 release before yesterday afternoon, then you should download it again. You only need the new Web.config file and the /bin/mojoPortal.Web.dll. Replace both of those on your installation with the new version.

There are 2 new Web.config settings that can make it easier while you are designing your skin. By default the css is cached heavily both on the server and in the browser, and this is ideal most of the time. But when you are designing your skin this caching can be a hassle because you have to keep clearing the cache. Now these 2 Web.config settigns allow you to disable the cache while you are designing.
<add key="CacheCssOnServer" value="true" />
<add key="CacheCssInBrowser" value="true" />

Ideally you will set those back to true when you are finished designing your skin.

Best,

Joe

12/23/2008 6:00:59 PM
Gravatar
Total Posts 41

Re: CSS Class not recognized.


Thanks Joe, your assistance is much appreciated. I figured out the ...

Even when working with the source code you will see warnings about unknown css classes. Its because at design time its not using the real skins but at runtime it is. At runtime, the skin is retrieved from a site specific folder, Data/Sites/[SiteID]/skins/[skinname], but the visual studio designer has no way of knowing this.

but I just don't know how to explain it.

 

You must sign in to post in the forums. This thread is closed to new posts.