Hey Ralf,

On Thu, Feb 4, 2010 at 3:21 PM, Ralf Eggert <[email protected]> wrote:
> Hi,
>
> I encoutered a problem when using Zend_Dojo on a IE6 browser. I have no
> idea if this problem is reproducable, but I would like to show my
> solution an ask a question.
>
> When using
>
>  $this->dojo()->addStyleSheetModule('dijit.themes.tundra');
>
> in a page, the following code is added:
>
>  <style type="text/css">
>  <!--
>     �...@import "/js/dijit/themes/tundra/tundra.css";
>  -->
>  </style>
>
> This crashes the IE6 on my page for 100%.
>
> Now when I remove the addStyleSheetModule() call with the following
>
>  $this->headLink()->prependStylesheet(
>     '/js/dijit/themes/tundra/tundra.css', 'screen, print'
>  );
>
> the IE6 does not crash any more. In the page, the following code is added:
>
>  <link href="/js/dijit/themes/tundra/tundra.css" media="screen, print"
>        rel="stylesheet" type="text/css" >
>
> The solution works fine for me, but I do have a question. Why is the
> dojo css file added in a different way? Why is not headLink() used
> internally? Are there any reasons why @import is favoured?
>
> Best regards,
>
> Ralf
>

>From a standards perspective there is no difference between linking
and importing. At least at that level. At that level means, it seems
to be in the html anyway, and not within another stylesheet.

Sometimes people use @import to hide css from older browsers, e.g.
@import('foobar') screen; should hide code from IE6 (if I remember
correctly) and a bunch of other browsers, but otherwise, there's no
difference at this "level" -- the other use case for @import is to
import styles into another stylesheet, but that doesn't seem to be the
case here.

Anyway, haven't heard of such a bug, and I feel your pain in regard to
supporting older browsers. :) Did you test this on a Windows with IE6,
or using one of these multi-ie-tools? Sometimes the tools crash for
other reasons, but you probably made sure that this is the real deal.

Till

Reply via email to