Currently this are what the Zen js files are named and contained:
html5.js = html5shiv.js only
html5-respond.js = html5shiv.js AND respond.js

How Zen works right now only up one of the above files ever gets included, just depending on what options a developer chooses on the appearance admin page:
Choosing "Add Respond.js..." - will included the "html5-respond.js" file
Choosing "Add HTML5 shim" - will include the "html5.js" file only if the "Add respond.js" option is not also chosen

...now the problem...

Though the admin configuration options would suggest otherwise, it is currently impossible for Zen to enable only respond.js:
if a developer unchecks "Add HTML5 shim" but still has the "Add respond.js" option checked the html5-respond.js file is still added to the page. So even though the developer explicitly has chosen differently, and the admin interface indicates otherwise, the developer will still have html5shiv added to their pages since html5shiv is part of the "html5-respond.js" file.

Zen needs a separate respond.js file which is not combined with any other scripts for this use case.

Comments

I agree the admin interface is misleading and should probably be updated, I'm curious what your use case is for including respond and not html5shiv though.

In my case I'm not using response.js (which is about supporting CSS3 media queries) in favor of using the classes that Zen creates to deal with IE, but I still want to have the HTML5 support that the shiv offers.

Ah, so it sounds like you want html5shiv and NOT respond.js (opposite of issue title).

I should have thought of this before, it sounds like you've run into this bug, fixed in dev:
#1601000: zen_html5_respond_meta settings not respected

I believe the version of zen I have (the dev version) has that patch applied already - media queries are working fine except for IE8 and that is more a problem with IE8 and respond.js of course. Instead of response.js I am using the .lt-ie9 class that Zen provides.

And sorry for the confusion, yes you're right I'm actually doing what does work correctly in the Zen ui - turning on html5shiv only, and leaving response.js off.

Status:Active» Fixed

Status:Fixed» Active

The interface text or functionality should probably still be updated.

Component:PHP/JS code» Documentation
Category:bug» feature

Thanks Cottser, suggestions or patch?

Here are a couple options:

  1. Provide a separate file that only contains respond.js and update functionality so they really can be inserted separately as reflected in the UI.
  2. Change the two separate checkboxes to radio buttons or a dropdown, whose two options are: 1. html5shiv only 2. html5shiv + respond.

I'm definitely leaning towards option #1. If you're using Modernizr you probably don't need html5shiv but maybe you still want respond.js (Modernizr used to include respond.js as a build option but that was removed in 2.5). Yes, it's easy to add respond.js in html.tpl.php but since the UI is already there why not make it work? From a project maintenance standpoint it might not be too bad if you have a script of some kind that can concatenate the two files into html5-respond.js every time you update html5shiv or respond.js.

I'd be happy to provide a patch.

Component:Documentation» PHP/JS code
Status:Active» Postponed

I believe (and hope) the direction we're going to go with respond.js is #1539682: Turn off Respond.js by default, use .lt-ie9 rules for IE8 layouts and I'm going to wait for John on this.

Title:Currently impossible to add respond.js without adding html5shivImpossible to add respond.js without adding html5shiv
Status:Postponed» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.