Design and CSS styles
Version 5.x > Design and CSS styles > CSS @import View modes: 
User avatar
Member
Member
Steve - 2/23/2011 5:52:05 AM
   
CSS @import
I'm using the reset.css by eric meyers however it needs to be listed prior to the site's layout css, etc.

To accomplish this with Kentico, I've placed an import at the beginning of the main stylesheet, however Kentico appears to be parsing the css file and extracting that import into a seperate link within the master page?

Has anyone had any luck using the reset.css stylesheet or controlling the order of stylesheets?

Thanks

Steve

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 2/23/2011 8:15:34 AM
   
RE:CSS @import
Hello,

Regrettably, there is no native way of doing this. However, you can edit the PortalTemplate.aspx.cs file in the CMSPages folder and parse the headers in the "this.HeaderTags" variable and change it according your needs.

Best regards,
Boris Pocatko

User avatar
Member
Member
Steve - 2/23/2011 10:38:38 AM
   
RE:CSS @import
Ok, no problem, I have a work around.

Any reason why it should want to parse the css to pull out imports?

Thanks

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 2/28/2011 3:28:49 AM
   
RE:CSS @import
Hello,

I consulted this issue with our developer an I need to correct my previous statement. The @import directive should work, since we don't parse the stylesheets at all. Are you sure you've set the path correctly?

Best regards,
Boris Pocatko

User avatar
Member
Member
Steve - 3/1/2011 2:14:17 AM
   
RE:CSS @import
Yep as far I could see, but the issue was that the reset stylesheet was being shown as a link in the masterpage head, even though I hadn't included it anywhere but within the import statement. Unfortunately I don't have the example up anymore as I used a work around, otherwise I would have been able to show you.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 3/1/2011 7:05:30 AM
   
RE:CSS @import
Hello,

I've googled arround and this seems to be a general .NET issue. For more information, please check this blog.

Best regards,
Boris Pocatko