Design criteria — standards compliance, performance, reliability, and security — limit both new and existing browser capabilities. As a result, CSS expressions (CSS expressions) are no longer supported in standard IE8 mode. This change was already announced
on the IE blog, but the developers decided to share more details about their decision. They answered questions about what it was, why they refused it, and how it threatens us.
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 link scripts to a page through CSS selectors. For example, the following CSS declaration allows you to change the background color of the page depending on the time of day:
div.title { background-color: expression( (new Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" ); }
Why is it over?
')
In order to meet the standards.
These expressions are proprietary to IE and cannot be used universally.
Frequent use of them was the struggle with IE errors or emulation of the not yet supported CSS 2.1 features, for example, min-width and max-width. The developers not only struggled with the errors, but also created a new engine that supports the necessary features initially.
To increase productivity.
The evaluation of expressions is very resource intensive; web productivity experts such as Steve Soders recommend avoiding them so that the client works faster and faster.
To reduce the attack surface of the browser
Opening up the execution context of scripts, CSS expressions is a possible path to code injection.
Are expressions still available in IE7 and Strangeness (Quirks) modes?
Yeah. For backward compatibility, CSS expressions are still executed in the Weird mode and IE7 Strict mode. But starting with IE8 Beta2, they are ignored in Standard mode of IE8.
Pages on my site use CSS expressions. How does this affect me?
Thanks to the new IE8 engine, most of the expressions written to get around errors and limitations of CSS 2.1 support will no longer be needed, everything will work correctly and standardly.
For more specific purposes, everything is achievable using standard JavaScript, which is more compatible with other browsers and does not affect performance.
Terminating expression support — a feature commonly used to correct what developers are now correcting themselves — will help make IE8 more standard, faster, and safer for hundreds of millions of future users.