Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional comments and bundles #4053

Closed
kate-kate opened this issue Jun 25, 2014 · 4 comments
Closed

Conditional comments and bundles #4053

kate-kate opened this issue Jun 25, 2014 · 4 comments
Labels
type:docs Documentation
Milestone

Comments

@kate-kate
Copy link
Contributor

I include some scripts in my html <!--[if lt IE 9]>
Should I create some special bundle for this case and place it under conditional comment? Or there is some ready solution for it?

@cebe
Copy link
Member

cebe commented Jun 25, 2014

you can specify a condition in cssOptions of the bundle.
See $options here: http://stuff.cebe.cc/yii2docs/yii-helpers-basehtml.html#cssFile%28%29-detail

@cebe cebe added the type:docs label Jun 25, 2014
@cebe cebe added this to the 2.0 RC milestone Jun 25, 2014
@samdark
Copy link
Member

samdark commented Jun 25, 2014

It's alredy supported:

class IeBundle
{
    // ...
    $cssOptions = [
        'condition' => ''lt IE9',
    ];
}

@kate-kate
Copy link
Contributor Author

thanks a lot

@cebe
Copy link
Member

cebe commented Jun 25, 2014

should be noted in the guide.

@cebe cebe closed this as completed in be78c43 Jun 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:docs Documentation
Projects
None yet
Development

No branches or pull requests

3 participants