html5boilerplate

HTML5 Boilerplate: Meta viewport and width=device-width

走远了吗. 提交于 2019-11-29 20:52:23
I'm building an adaptive/responsive website. Regarding this recent change to the HTML5BP: " mobile/iOS css revisions " I've started using: <meta name="viewport" content="width=device-width"> ... and I have this in my CSS: html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } When initial-scale=1 was included, rotating from vertical to horizontal (on iPad/iPhone) caused the layout to change from 2 columns (for example) to 3 columns (due to meida queries, initial-scale=1 and JS fix for viewport scale bug ). To summarize , when in landscape mode, this zooms the page: <meta name=

Internet Explorer, Closure Compiler and Trailing Commas

蓝咒 提交于 2019-11-29 10:52:26
I'm using html5boilerplate build script and when minifying the scripts (which uses Google Closure Compiler) I'm getting this error -js.all.minify: [echo] Minifying scripts [copy] Copying 3 files to /Users/Username/Desktop/Web/intermediate/js [apply] /Users/Juan/Desktop/Web/js/plugins.js:117: ERROR - Parse error. Internet Explorer has a non-standard intepretation of trailing commas. Arrays will have the wrong length and objects will not parse at all. [apply] }, { duration: 727 }) [apply] ^ But the code DOES work in IE 8 if run uncompiled. This is the code anim1.animate({ 'left': '+=32px',

Should SVG contents be visible outside an embedded <svg> by default? [closed]

醉酒当歌 提交于 2019-11-29 06:43:19
In the past I answered a question about "who was wrong" in regards to SVG images not being "cropped" ( overflow: hidden ) in IE9, where all other supporting browsers did so. The answer is here . Today, while reviewing HTML5 Boilerplate again, I noticed that they claim they "[correct] overflow not being hidden in IE9" with this bit of code: svg:not(:root) { overflow: hidden; } I'm looking for someone to confirm or deny my original research by pointing to some other note in either the HTML5 or SVG specs. I cannot find anything, but I want to be sure I am not missing something. The best I can

IE and HTML5 doctype issues

血红的双手。 提交于 2019-11-29 05:59:41
I'm using the great HTML5 boilerplate. It's a great project but I'm having some big issues rendering in IE 8 and 7 (possibly 8 but haven't tried yet) The files have the HTML5 doctype: <!doctype html> <head> But the problem is that having no full and ugly doctype like... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> I get all kind of rendering issues: centering by margin:auto doesn't work, heights, widths, martings and paddings all behave like crazy and all my layout is broken

HTML5 Boilerplate: Meta viewport and width=device-width

99封情书 提交于 2019-11-28 17:03:16
问题 I'm building an adaptive/responsive website. Regarding this recent change to the HTML5BP: "mobile/iOS css revisions" I've started using: <meta name="viewport" content="width=device-width"> ... and I have this in my CSS: html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } When initial-scale=1 was included, rotating from vertical to horizontal (on iPad/iPhone) caused the layout to change from 2 columns (for example) to 3 columns (due to meida queries, initial-scale=1 and JS fix

Internet Explorer, Closure Compiler and Trailing Commas

僤鯓⒐⒋嵵緔 提交于 2019-11-28 04:34:46
问题 I'm using html5boilerplate build script and when minifying the scripts (which uses Google Closure Compiler) I'm getting this error -js.all.minify: [echo] Minifying scripts [copy] Copying 3 files to /Users/Username/Desktop/Web/intermediate/js [apply] /Users/Juan/Desktop/Web/js/plugins.js:117: ERROR - Parse error. Internet Explorer has a non-standard intepretation of trailing commas. Arrays will have the wrong length and objects will not parse at all. [apply] }, { duration: 727 }) [apply] ^ But

HTML5 Boilerplate plugins.js

女生的网名这么多〃 提交于 2019-11-28 03:49:48
How is one expected to include additional js files in plugins.js? Is the expectation that we just copy and paste the contents of each plugin there? Or is there some method of doing a js include that I should be using? Specifically, I'd like to see an example of goes within this function: // remap jQuery to $ (function($){ })(this.jQuery); That section of the html5boilerplate is sort of an abbreviation of what should/could go there. You can approach plugins.js a few ways: Ignore it and include all of your JS plugins as separate files (undesirable) Manually concatenate and minify the plugin

AngularJS in HEAD vs BODY

喜你入骨 提交于 2019-11-27 10:38:55
In all of the AngularJS examples, the Angular library is placed in the HEAD tags of the document. I have an existing project that has been built upon the HTML5 Boilerplate layout. This defines that JS libraries should be placed at the very bottom of the DOM before the </BODY> tag. Does AngularJS need to be placed in the HEAD? Mark Rajcok AngularJS does not need to be placed in the HEAD, and actually you normally shouldn't, since this would block loading the HTML. However, when you load AngularJS at the bottom of the page, you will need to use ng-cloak or ng-bind to avoid the "flash of

HTML5 Boilerplate plugins.js

∥☆過路亽.° 提交于 2019-11-27 00:11:20
问题 How is one expected to include additional js files in plugins.js? Is the expectation that we just copy and paste the contents of each plugin there? Or is there some method of doing a js include that I should be using? Specifically, I'd like to see an example of goes within this function: // remap jQuery to $ (function($){ })(this.jQuery); 回答1: That section of the html5boilerplate is sort of an abbreviation of what should/could go there. You can approach plugins.js a few ways: Ignore it and

JavaScript on the bottom of the page?

百般思念 提交于 2019-11-26 22:39:24
I've read that it is better to keep all of your JavaScript files on the bottom of the webpage. The HTML5 Boilerplate template seems to agree: http://html5boilerplate.com/ And seems to be widely used. My question is: first, does this have any real basis? I've done testing in Firebug and it seems to have some small effect, but is it trivial? Images and other sources don't seem to start loading until CSS files and script files have loaded, but sticking them on the bottom doesn't seem to make much difference in this at all. Undefined It is very important for best practice reasons. When you have