You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by "Carlucci, Tony" <ac...@mitre.org> on 2012/05/02 20:10:15 UTC

Modernizr / HTML5Shiv / CSS3 Mediaqueries Overlap?

Hello Rave Devs,

I was looking over our third-party JavaScript includes and noticed we may have some overlap now, but was hoping someone could definitively confirm either way.  With the Bootstrap work we introduced an import to Modernizr[1] to assist with HTML5 and CSS3 capabilities in older browsers.    We also have two imports to Google Code scripts:

<%-- google css3 mediaqueries script --%>
<!--[if lt IE 9]><script src=//css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js></script><![endif]-->
<%-- google html5 script --%>
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

That *seem* to also have been doing the same thing in tandem.  So the question is, does Modernizr do everything the two Google Code scripts are doing, and could we then remove the two Google Code scripts?

Thanks, Tony

[1] http://modernizr.com/



RE: Modernizr / HTML5Shiv / CSS3 Mediaqueries Overlap?

Posted by "Carlucci, Tony" <ac...@mitre.org>.
>-----Original Message-----
>From: K. Legacy [mailto:kristenlegacy@gmail.com]
>Sent: Wednesday, May 02, 2012 3:15 PM
>To: dev@rave.apache.org
>Subject: Re: Modernizr / HTML5Shiv / CSS3 Mediaqueries Overlap?
>
>Hey!
>
>Basically Modernizr adds classes to your HTML using media queries to detect
>features and allows you to use HTML5 tags in IE. Html5shiv on the other
>hand keeps ie from freaking out over them, but doesn't mean you can do
>anything with them. I did a little digging to be sure, and according to
>modernizr <http://modernizr.com/docs/>,  "As of Modernizr 1.5, this script
>is identical to what is used in the popular html5shim/html5shiv library" so
>removing the html5shiv shouldn't cause any issues.
>
>As far as I know Modernizr doesn't actually add support for css3 media
>queries so it might be best to use yepnope to test for media query support
>and add the css3-media-query script if needed. Something like:
><script>
>        yepnope({
>    test : Modernizr.mq('(only all)'),
>    nope : ['//
>css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js']
>});
></script>
>
>Kristen

Great, thanks for the information Kristen.  I'll create a Jira ticket to make the changes you suggested.


>
>On Wed, May 2, 2012 at 2:10 PM, Carlucci, Tony <ac...@mitre.org> wrote:
>
>> Hello Rave Devs,
>>
>> I was looking over our third-party JavaScript includes and noticed we may
>> have some overlap now, but was hoping someone could definitively confirm
>> either way.  With the Bootstrap work we introduced an import to
>> Modernizr[1] to assist with HTML5 and CSS3 capabilities in older browsers.
>>    We also have two imports to Google Code scripts:
>>
>> <%-- google css3 mediaqueries script --%>
>> <!--[if lt IE 9]><script src=//
>> css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js
>> ></script><![endif]-->
>> <%-- google html5 script --%>
>> <!--[if lt IE 9]><script src="//
>> html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
>>
>> That *seem* to also have been doing the same thing in tandem.  So the
>> question is, does Modernizr do everything the two Google Code scripts are
>> doing, and could we then remove the two Google Code scripts?
>>
>> Thanks, Tony
>>
>> [1] http://modernizr.com/
>>
>>
>>

Re: Modernizr / HTML5Shiv / CSS3 Mediaqueries Overlap?

Posted by "K. Legacy" <kr...@gmail.com>.
Hey!

Basically Modernizr adds classes to your HTML using media queries to detect
features and allows you to use HTML5 tags in IE. Html5shiv on the other
hand keeps ie from freaking out over them, but doesn't mean you can do
anything with them. I did a little digging to be sure, and according to
modernizr <http://modernizr.com/docs/>,  "As of Modernizr 1.5, this script
is identical to what is used in the popular html5shim/html5shiv library" so
removing the html5shiv shouldn't cause any issues.

As far as I know Modernizr doesn't actually add support for css3 media
queries so it might be best to use yepnope to test for media query support
and add the css3-media-query script if needed. Something like:
<script>
        yepnope({
    test : Modernizr.mq('(only all)'),
    nope : ['//
css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js']
});
</script>

Kristen

On Wed, May 2, 2012 at 2:10 PM, Carlucci, Tony <ac...@mitre.org> wrote:

> Hello Rave Devs,
>
> I was looking over our third-party JavaScript includes and noticed we may
> have some overlap now, but was hoping someone could definitively confirm
> either way.  With the Bootstrap work we introduced an import to
> Modernizr[1] to assist with HTML5 and CSS3 capabilities in older browsers.
>    We also have two imports to Google Code scripts:
>
> <%-- google css3 mediaqueries script --%>
> <!--[if lt IE 9]><script src=//
> css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js
> ></script><![endif]-->
> <%-- google html5 script --%>
> <!--[if lt IE 9]><script src="//
> html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
>
> That *seem* to also have been doing the same thing in tandem.  So the
> question is, does Modernizr do everything the two Google Code scripts are
> doing, and could we then remove the two Google Code scripts?
>
> Thanks, Tony
>
> [1] http://modernizr.com/
>
>
>