IE8 will not support CSS expressions
Design criteria — standards compliance, performance, reliability, and security — limit both new and existing browser capabilities. As a result, CSS expressions are no longer supported in IE8 standard mode. This change was already announced on the IE blog, but the developers decided to share additional details about their decision. They answered questions about what it was, why they refused it and how it threatens us.
Also known as Dynamic Expressions, proprietary CSS expressions appeared in IE5. Long before the advent of JavaScript libraries such as jQuery and Dojo, they allowed web developers to dynamically attach scripts to a page through CSS selectors. For example, the following CSS declaration allows you to change the background color of a page depending on the time of day:
These expressions are proprietary to IE and cannot be used universally.
Their common use was fighting IE errors or emulating CSS 2.1 features that were not yet supported, such as min-width and max-width. The developers not only struggled with errors, but also created a new engine that supports the necessary capabilities initially.
Evaluating expressions is very resource intensive; Web performance experts such as Steve Soders recommend avoiding them so that the client works faster.
By opening the scripting context, CSS expressions are a possible way to inject code.
Yeah. For backward compatibility, CSS expressions are still executed in Oddities mode and IE7 Strict mode. But starting with IE8 Beta2, they are ignored in IE8 Standard Mode.
Thanks to the new IE8 engine, most expressions written to circumvent errors and limitations of support for CSS 2.1 will no longer be needed, everything will work correctly and standardly anyway.
For more specific purposes, everything is achievable using standard JavaScript, which is more compatible with other browsers and does not hit performance.
Discontinuing expression support - a feature commonly used to fix what developers are currently fixing themselves - will help make IE8 standard, faster and safer for hundreds of millions of future users.
What is a CSS expression?
Also known as Dynamic Expressions, proprietary CSS expressions appeared in IE5. Long before the advent of JavaScript libraries such as jQuery and Dojo, they allowed web developers to dynamically attach scripts to a page through CSS selectors. For example, the following CSS declaration allows you to change the background color of a page depending on the time of day:
div.title { background-color: expression( (new Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" ); }
Why is it put an end to?
In order to comply with standards.
These expressions are proprietary to IE and cannot be used universally.
Their common use was fighting IE errors or emulating CSS 2.1 features that were not yet supported, such as min-width and max-width. The developers not only struggled with errors, but also created a new engine that supports the necessary capabilities initially.
To increase productivity.
Evaluating expressions is very resource intensive; Web performance experts such as Steve Soders recommend avoiding them so that the client works faster.
To reduce browser attack surface
By opening the scripting context, CSS expressions are a possible way to inject code.
Are expressions still available in IE7 and Quirks modes?
Yeah. For backward compatibility, CSS expressions are still executed in Oddities mode and IE7 Strict mode. But starting with IE8 Beta2, they are ignored in IE8 Standard Mode.
Pages on my site use CSS expressions. How does this affect me?
Thanks to the new IE8 engine, most expressions written to circumvent errors and limitations of support for CSS 2.1 will no longer be needed, everything will work correctly and standardly anyway.
For more specific purposes, everything is achievable using standard JavaScript, which is more compatible with other browsers and does not hit performance.
Discontinuing expression support - a feature commonly used to fix what developers are currently fixing themselves - will help make IE8 standard, faster and safer for hundreds of millions of future users.