Oh yeah? What else?
Easy Integration
Just add StyleManager around your existing styles.
<gb:StyleManager runat="server">
<Styles>
<link type="text/css" rel="stylesheet" href="~/2.css"/>
<link href="~/includes/css/1.css"/>
<style type="text/css">
.mySelectorA { border: solid 1px green; }
.mySelectorB { color: Aqua; }
</style>
</Styles>
</gb:StyleManager>
Relative Background Image Urls
Support for tilde (~) in background image urls.
.logo {
background-image: url( ~/includes/images/logo.png );
}
Cache Management
Created files include an identifying key to prevent caching of previous styles.
MyCssGroup-v=9268966359762623624.css
Render to the Head Element
The CSS is always added to the Head tag, regardless of where the StyleManagers are located.
<head>
<title>My Page</title>
<link href="MyMasterPageCss-v=833859.css" rel="stylesheet" type="text/css" />
<link href="MyPageCss-v=926896.css" rel="stylesheet" type="text/css" />
<link href="MyControlCss-v=663597.css" rel="stylesheet" type="text/css" />
<head/>
Easily Add CSS Files Programmatically
No more fetching of the master page's Head tag, use of placeholders, or manual creation of Link tags.
this.MyStyleManager.AddCssFile("~/addedDynamically.css");
Embedded CSS
Optionally render the processed CSS directly to the head tag, negating the need to download any style sheets at all.
<gb:StyleManager runat="server" RenderCssOnPage="true" >
<CssFiles>
<gb:FileReference Path="~/foo.css" />
<gb:FileReference Path="~/bar.css" />
</CssFiles>
</gb:StyleManager>
<head>
<title>My Page</title>
<style type="text/css">.fooStyle{color:blue}.barStyle{color:red}</style>
<head/>
Seeing is believing
In this real-world usage the overall download time of the styles was reduced by 91% - making the page load over four seconds faster.
Who's using it?