SharePoint 2010: CssRegistration ConditionalExpression Property
In a previous post detailing the new SharePoint 2010 CssRegistration control, I mentioned that I did not know what the ConditionalExpression property did. Well, now I do!
This property takes an Internet Explorer Conditional Comment. For example, if we wanted to link to a style sheet specific to IE 7 or greater, we can do this:
<SharePoint:CSSRegistration Name="foo.css" ConditionalExpression="gte IE 7" runat="server" />
The following markup would be emitted:
<!--[if gte IE 7]> <link rel="stylesheet" type="text/css" href="foo.css"/> <![endif]-->
Categories: Development, HTML/CSS, SharePoint