Content deleted Content added
→"Hacks": more |
→Parsing Hacks: + ie mac comment bug |
||
Line 35:
==== Parsing Hacks ====
There are many hacks based on CSS parser bugs in particular browsers, particularly parsing of comments, and [[escape character|backslash-escaping]].
===== Commented Backslash =====
This hack uses a bug in [[Internet Explorer for Mac]] related to comment parsing. A comment ending in "\*/" is not properly closed in IE Mac, so rules that need to be ignored in IE mac can be placed after such a comment. Another comment is needed after the rule to close the comment for IE mac.
<pre>/* Ignore the next rule in IE mac \*/
selector { ...styles... }
/* Stop ignoring in IE mac */</pre>
===== "Box Model Hack" =====
Called the "Box Model Hack" because the bug it is most often used to work around is the [[Internet Explorer box model bug]], this hack provides a different set of properties to IE and other browsers.
Line 50 ⟶ 57:
The first "voice-family" statement is set to the string '"}"', but an IE parser bug will interpret it as a string with a single backslash followed by a } for the end of the rule. voice-family is chosen because it will not affect rendering on a screen stylesheet. The second rule is for browsers such as [[Opera (Internet suite)|Opera]] 5 that have the parsing bug but do not have the box model bug.
==== Selector Hacks ====
===== Star HTML hack =====
|