In the eighth version of Internet Explorer, a lot of changes are expected, there are some that concern CSS. A good developer should try to know about the capabilities of various browsers, so I consider the css-nuances of the new IE interesting. An
article “Microsoft CSS Vendor Extensions” appeared on the official blog of internet explorer developers, in which css-changes are described in sufficient detail.
Below the cut, I gave the basic information on changes and innovations.
First of all, you need to tell that Microsoft has changed the naming procedure for some properties of css. Now all "non-standard properties" get the prefix "-ms-". In order to fully comply with css 2.1 in IE 8, such a prefix obtained properties suitable for the following conditions:
- if the property is an extension of Microsoft (not defined in the specification or CSS module);
- if the property is part of a CSS specification or module that has not received the Candidate Recommendation status from the W3C;
- if the property only partially implements the property defined in the CSS specification.
Here is a list of properties that received the prefix "-ms-" (indicating the reason):
Property | Type | W3C Status |
-ms- accelerator | Extension | |
-ms- background-position-x | CSS3 | Working draft |
-ms- background-position-y | CSS3 | Working draft |
-ms- behavior | Extension | |
-ms- block-progression | CSS3 | Editor's Draft |
-ms- filter | Extension | |
-ms- ime-mode | Extension | |
-ms- layout-grid | CSS3 | Editor's Draft |
-ms- layout-grid-char | CSS3 | Editor's Draft |
-ms- layout-grid-line | CSS3 | Editor's Draft |
-ms- layout-grid-mode | CSS3 | Editor's Draft |
-ms- layout-grid-type | CSS3 | Editor's Draft |
-ms- line-break | CSS3 | Working draft |
-ms- line-grid-mode | CSS3 | Editor's Draft |
-ms- interpolation-mode | Extension | |
-ms- overflow-x | CSS3 | Working draft |
-ms- overflow-y | CSS3 | Working draft |
-ms- scrollbar-3dlight-color | Extension | |
-ms- scrollbar-arrow-color | Extension | |
-ms- scrollbar-base-color | Extension | |
-ms- scrollbar-darkshadow-color | Extension | |
-ms- scrollbar-face-color | Extension | |
-ms- scrollbar-highlight-color | Extension | |
-ms- scrollbar-shadow-color | Extension | |
-ms- scrollbar-track-color | Extension | |
-ms- text-align-last | CSS3 | Working draft |
-ms- text-autospace | CSS3 | Working draft |
-ms- text-justify | CSS3 | Working draft |
-ms- text-kashida-space | CSS3 | Working draft |
-ms- text-overflow | CSS3 | Working draft |
-ms- text-underline-position | Extension | |
-ms- word-break | CSS3 | Working draft |
-ms- word-wrap | CSS3 | Working draft |
-ms- writing-mode | CSS3 | Editor's Draft |
-ms- zoom | Extension | |
')
Developers understand that many sites will have to convert old values ​​to new ones, so old values, although they will be considered obsolete, will be supported in the eighth version for compatibility. When developing new code for IE 8, only new naming should be used.
Filter property
Changes affected such properties as filter. Previously, unfortunately, the filter syntax was not consistent with CSS 2.1. For example, in the specified code, commas were considered invalid.
filter: progid: DXImageTransform.Microsoft.Alpha (Opacity = 80, FinishOpacity = 70, Style = 2);
In the new version of the browser, the filter syntax is adapted to the requirements of the CSS specification:
-ms-filter: “progid: DXImageTransform.Microsoft.Alpha (Opacity = 80, FinishOpacity = 70, Style = 2)”;
It is easy to see that in the new syntax the value of the property is in quotes.