4

In jquery-ui-1.8.6.custom.css, I found this gem:

/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
    display: none; /*sorry for IE5*/
    display/**/: block; /*sorry for IE5*/
    position: absolute; /*must have*/
    ...
}

Apparently, repeating the display style is a workaround for a bug in IE. If I understand CSS correctly, this should behave like display: block; (i.e. the first entry should be overridden by the second).

For which version(s) of IE is this necessary? Only 5.x or 6 as well?

Sampson
  • 265,109
  • 74
  • 539
  • 565
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • 1
    Your understanding is correct, I just can't recall which specific version of IE trips up on this CSS. The hack lies in the `/**/`. – BoltClock Feb 14 '11 at 11:05
  • 1
    Rather odd they even bothered with those considering jQuery *core's* support starts with IE6... – Su' Feb 14 '11 at 11:47

1 Answers1

3

See: http://www.communis.co.uk/dithered/css_filters/css_only/property_empty_comment.html:

#testElement {
   color/**/: #00cc00;
   }

Applied By
..
Win IE 5.5 - 6.x
..

Not Applied By
Win IE 4.0 - 5.0
..

So, the comment /*sorry for IE5*/ aptly describes the hack - the zero IE5.0 users still in existence will not be able to see any .ui-datepicker-cover elements.

thirtydot
  • 224,678
  • 48
  • 389
  • 349
  • Nice digging. That's some seriously old-skool filtering. I don't think I ever used this particular one, even back then. – Su' Feb 14 '11 at 11:55