Ryan
Ryan

Reputation: 6217

YSlow: Avoid CSS Expressions called on CSS Parameter

I ran my site through YSlow and received an F on "Avoid CSS Expressions" for CSS hrefs like this:

<link href="/css/font-awesome-ie7.min.css?1420669254" media="screen" rel="stylesheet" type="text/css" />

Does YSlow not like CSS parameters? Anything I can try to get this YSlow compliant?

Upvotes: 0

Views: 416

Answers (1)

BrianC
BrianC

Reputation: 10721

From the Yahoo best practices explanation of CSS Expressions:

CSS expressions are a powerful (and dangerous) way to set CSS properties dynamically. They were supported in Internet Explorer starting with version 5, but were deprecated starting with IE8.

Some options for dealing with this:

  • Remove the link to the font awesome IE7 CSS file and don't worry about any IE7 specific support
  • Dig into that CSS file to find and fix the CSS expressions (difficult)
  • Ignore the bad YSlow grade for that component.

Upvotes: 1

Related Questions