RSS

Additions to combine control

05 Jun

Ok, I’ve slightly changed some of the behaviour of the script combining control. In addition it now combines, compresses, minifies and caches CSS files! The CSS can also be used to target certain browsers and versions. It can be used like this:

<cc:CSSCombine ID="CSSCombiner" runat="server" CSSHandler="~/Handlers/CSSCombine.ashx">
<CSSReferences>
<cc:CSSReference TargetBrowser="All" Path="~/Styles/admin.css" /> <%--Will target all versions of all browsers--%>
<cc:CSSReference Path="~/Styles/webTV.css" /> <%-- Will target all versions of all browsers --%>
<cc:CSSReference TargetBrowser="IE" TargetVersion="8" Path="~/Styles/admin_old.css" /> <%-- Will target version 8 of IE --%>
<cc:CSSReference TargetBrowser="FF" TargetVersion="2" Path="~/Styles/screen.css" /> <%-- Will target versions 2 of FireFox --%>
<cc:CSSReference TargetBrowser="Chrome" Path="~/Styles/main.css" /> <%-- Will target all versions of Chrome --%>
<cc:CSSReference TargetBrowser="Safari" Path="~/Styles/sifr.css" /> <%-- Will target all versions of Safari --%>
</CSSReferences>
</cc:CSSCombine>

<cc:CSSCombine ID="CSSCombiner" runat="server" CSSHandler="~/Handlers/CSSCombine.ashx">

<CSSReferences>

<cc:CSSReference TargetBrowser="All" Path="~/Styles/admin.css" /> <%--Will target all versions of all browsers--%>

<cc:CSSReference Path="~/Styles/webTV.css" /> <%-- Will target all versions of all browsers --%>

<cc:CSSReference TargetBrowser="IE" TargetVersion="8" Path="~/Styles/admin_old.css" /> <%-- Will target version 8 of IE --%>

<cc:CSSReference TargetBrowser="FF" TargetVersion="2" Path="~/Styles/screen.css" /> <%-- Will target versions 2 of FireFox --%>

<cc:CSSReference TargetBrowser="Chrome" Path="~/Styles/main.css" /> <%-- Will target all versions of Chrome --%>

<cc:CSSReference TargetBrowser="Safari" Path="~/Styles/sifr.css" /> <%-- Will target all versions of Safari --%>

</CSSReferences>

</cc:CSSCombine>

Download it download

Advertisements
 
Leave a comment

Posted by on June 5, 2009 in C# Development, HTML / CSS, JavaScript

 

Tags: , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: