HTML5 Boilerplate http://html5boilerplate.com
We are now using normalize.css developed by Nicolas Gallagher along with Jonathan Neal instead of the traditional CSS Reset stylesheet.
normalize.css retains useful browser defaults and includes several common fixes to improve cross-browser (desktop and mobile) styling consistency.
Lots of research has gone into normalize, verifying what are the default user agent styles provided by each browser. We can very specifically change only the ones we need to instead of the bulldozer approach.
- Who likes being so damn redundant and declaring:
em, i { font-style: italic; }
- By using normalization instead of a reset + building up default styles, we use less styles and save bytes
- Less noise in your dev tools: when debugging, you don't have to trawl through every reset selector to reach the actual style that is causing the issue.
- More details here: http://necolas.github.com/normalize.css/
- With the latest release of Chrome frame which does not require admin access to be installed, we felt it was a good time to prompt IE 6 users to install Chrome Frame. (Using protocol-relative url and exact version for higher expires headers)
####BUILD SCRIPT++: Faster, @import inlining, appcache generation
- If 15 seconds was too long to wait before, you'll be happy with the changes. Via a new "intermediate" folder, we cut down build time by 80% or more.
- If you use
@import
s in your CSS to author in multiple files, the build script will inline all these together. This way, you have a maintainable authoring experience, and still a highly performant production version. - Making an app that works offline is a badge of honor. Now with a flick of a config switch, the H5BP build script can autogenerate your cache manifest file with all the right info and wire it up. It'll also keep the manifest revved as you deploy new changes.
- Add
respond.js
as a shift to a responsive approach. Updated it to an improved, comment-free version which would enable IEs to also apply styles using media queries.
- Remove
handheld.css
as we do not think it was useful among the diverse feature phones - We feel tools like imagealpha and pngquant are more useful than using stopgap fixes like belatedpng.
- Disable directory browsing by default
- removed trailing slash redirects in
.htaccess
. More: https://github.com/paulirish/html5-boilerplate/wiki/Proper-usage-of-trailing-slash-redirects #493 #515 - Updating TTF mimetype to fix Google Chrome warning
- Improved support for all versions of Apache, incl workaround for bug in
mod_filter
: Fixes #441. Fixes #499. Fixes #535. Closes #549. (the grouping ticket) Ref #576 - Use substring matching in
gzip
filter_module
andre-enable gzip
for some common MIME-types mod_deflate
trigger rules modifications- Add gzip support for XHTML, RSS, Atom
- Move font & SVG compression from FilesMatch to FilterProvider / AddOutputFilterByType
- Added m4a (Need it for IE9) and m4v (HandBrake default) MIME types.
- moved ETag removal configs closer
- added Header unset ETag In some servers setting "FileETag None" alone, is not enough. Removing header and setting it to None fixes the issue.
- Add
Options +FollowSymlinks
whenRewriteEngine
is used. Fixes #489. - Some more security for PHP: turn off
error display
and turn onerror logging
- Allow Blackberry to read vCards
-
CSSLint, JSLint, JSHint tools are now optionally available in the build script
-
New features in build script:
-
Added a
files.bypass
property which when set, will not compress the listed JavaScript files, but just silently passes it on to the publish folder without any change. -
Added a
images.bypass
with a list of image files or folders within the img directory that you do not want to be optimized. Fixes #564 -
Build script is compatible with php files now. it appears. fixes #392.
-
Build script now generates
.appcache
manifest. see #652 -
Test for Ant version to head off problems with Ant < 1.8.2
-
Removes concatenated CSS files from
index.html
when they are<link>
-ed. Fixes #452 -
Added
DOCTYPE
so IDEs don't complain about the lack of schema. http://stackoverflow.com/questions/363768/disable-dtd-warning-for-ant-scripts-in-eclipse -
Updated Windows
optipng
andjpegtran
paths to include${basedir}
-
Minification affects all
.css
and.js
files in/css
and/js
dirs, not just the ones explicitly included in concatenation. -
Build script: compress all images in subfolders, too.
-
Added
gae.js_dir
andgae.css_dir
so that App Engine projects can have the correct directory names swapped in their templates. -
Added a second replace token statement so that
/css/style.css
gets swapped too. -
Change
*.png
and*.jpg
to**/*.png
and**/*.jpg
so that optimize commands reach subdirectories. -
Improved build script compatibility with Netbeans IDE.
default.properties
: added IDE generated files/folders to exclude from build script.gitignore
: Filename case correction for Windows generated Thumb.db Fix #374 -
Adding properties to
project.properties
so that Google App Engine builds don't have "static" prepended when swapping for minified versions. -
console.log
messages are no longer commented out. uselog()
instead -
Much faster build process
Intermediate stages are stored in a new intermediate folder, and only files that should be published are copied into the publish folder.
Files are not deleted at the beginning of every build, and files that have already been processed will not be reprocessed unless the source has changed.
- Files are revved by SHA, not incrementally at each build
Versioned files are referenced by a SHA-1 hash of the content rather than a build number. This means that changing your HTML and rebuilding will not cause your users to redownload the same CSS and JavaScript, and a reverted change may cause users to use a copy that was previously downloaded. It may be better to use only part of the hash so the HTTP request is shorter.
- Copy files last. This slightly simplifies copying because we don't have to exclude PNG, JPEG, or HTML files from the copy stage. (It comes preminified, and we don't need to minify it again.) This also updates the HTML so that the script is not missing if the un-minified scripts are unavailable on the server. This commit requires a change to existing HTML files :/
- Change the source htaccess rather than updating it
- Update yuicompressor to 2.4.5. fixes media query minification issue.
- Update htmlcompressor to 1.1 which uses the new yuicompressor for CSS.
- Try not to re-optimize the same images every time
- Lots of bug fixes for edge cases and improved techniques...
- Use minified jQuery by default. / jQuery updated to 1.6.2
- Add
respond.js
as part of shift to 'mobile first' approach. - Updated to Modernizr 2.0 Complete, Production minified.
- Prompt IE 6 users to install Chrome Frame, update chromeframe install to 1.0.3. Move chromeframe to bottom of page after the other scripts. also reference exact version for higher expires headers. Use protocol-relative url for chrome frame URL Fixes #495
- Removing touch icon link tags and retaining only the comment.
- Encourage people to send the
X-UA-Compatible
HTTP header instead of leaving it in the HTML, to avoid edge case issues. Fixes #378. - Remove the cache-busting query parameters from the HTML.
- Simplify the conditional comment containing code for IE 9+ and modern browsers
- Simpler escape for
</script>
. See http://mathiasbynens.be/notes/etago for more information. - Encourage people to use a custom Modernizr build containing only the features they need for that particular project.
- Added maximum touch-icon support as per http://mathiasbynens.be/notes/touch-icons#sizes
- Add a link to optional
<meta>
tags that could be added to the<head>
element: https://github.com/paulirish/html5-boilerplate/issues/482 - Standardize the use of single and double quotes as per http://h5bp.com/d/The-markup★quotes
- Added Site Speed tracking for Google Analytics
- Using
Modernizr.load/yepnope
for loading Google Analytics. Fixes #542 - Google Analytics now retrieved with
Modernizr.load()
for byte brevity and optimal speed
- Major: Now using CSS normalization instead of CSS reset + building up default styles. Fixes #412, #500, #534. Closes #456. Links #566
- Add
'oldie'
class to conditional<html>
classnames. Fix #522 - Add
img { max-width: 100%; }
to print styles to prevent images from getting cut off. - Update clearfix to use 'micro' clearfix http://nicolasgallagher.com/micro-clearfix-hack/
- Add placeholder CSS media queries for mobile-first approach
- Tweaking our hot pink
::selection
. It is now #fe57a1, which is Festal (adj): pertaining to or befitting a feast, festival, holiday, or gala occasion. - Use
color: black
for links when printing, refs #147 - added
vertical-align: middle
to fix borders on image containers. Fixes #440 - Add
<svg>
overflow fix for IE9. Group<img>
and<svg>
rules in an 'embedded content' section of CSS file. Add{cursor:pointer}
to<label>
element. - Switch to
outline:0
for accesible focus treatment. Avoids Opera bug when combined with transitions. Also saves bytes. - Set
{overflow:auto}
for<button>
and<input>
in<table>
in IE6/7. Avoids numerous layout and whitespace issues that result from setting{overflow:visible}
to fix the odd inner spacing of those form elements. - Add
{resize: vertical}
to<textarea>
. Only allow vertical resizing
.gitignore
additions: textmate project folder, older CVS folders, sass_cache.- Update HTML elements demo: reduce repetition, remove deprecated elements, add certain HTML5 elements, add more comprehensive collection of HTML5 input types, include different form markup styles, add form elements box-sizing test
- Add
.gitattributes
to help with consistent line endings - Changed curly quotes to straight quotes in
crossdomain.xml
- 26a391c60d0356e2e0dcf1929381583622e1be9c Revert "Added native iOS inertia scrolling"
- ddaf66a515c09f835603f95fe723d7da691324e6 Major: Now using CSS normalization instead of CSS reset + building up default styles
- e5e057e53815ed55f4ecfaef3057bf2940c7c0b2 Change our conditional comments around the HTML tag to use a single
.oldie
class. - 7f53f98ec734e6b655d7a50fd245277d388fac1e Revert "Change our conditional comments around the HTML tag to use a single
.oldie
class." - 648026d780dc6b9ecad8d37d61a92b69be5fd654 Tweaking our hot pink
::selection
based on a suggestion from David Murdoch and research from Adam Diehm. - 0e1c7ba929caddec63971cccfb7de7c0d343e060 Use minified jQuery by default.
- a0ac99a4d96453e68ff4e650fca3055767ec26aa optimize build process
- bb22ca66a8619808a87c1b5438845ed44baa4d3e Remove the cache-busting query parameters from the HTML.
alrra Adeel Ejaz David Murdoch Jonathan Fielding Robert Ros Rob Larsen William Meleyal Bruno De Barros Mike Almond Frank Joey Baker Ben Word Mike Botsko Carlos Rosquillas Todd H. Gardner rdeknijf John Attebury Calvin Rien Ryan Seddon Dayle Rees Ryan Smith-Roberts Brian Blakely Steve Heffernan Barney Carroll Osman Gormus Jason Tokoph See Guo Lin Jeremey Hustman James Williams John-Scott Atlakson stereobooster walker François Robichet leobetosouza Matthew Donoughe Patrick Hall Andy Dawson Daniel Filho Clément Joe Morgan Han Lin Yap Gregg Gajic Michael Cetrulo Robert Doucette lexadecimal.com Adam Diehm
- Files linked via
@import
will be inlined into the files they are imported to using Corey Hart's CSS Compressor. - Environments are definable.
- htaccess Expires headers are upgraded to 1year, as the filenames are revved
- Massive rewrite so you can define which HTML, CSS, and JS files to operate on in your configurable project.properties files. This allows you to let the build script operate on unique folder architectures (including non-H5BP projects).
- Added a source directory option in the build config, so your source files can be in a different directory from the final generated files. (Useful for other CMSes/frameworks like Django.)
- We use a protocol-relative URL for the jQuery include, to prevent the mixed content warning.
- The order of
<meta>
tags,<title>
, andcharset
has been documented more extensively now. TL;DR: You are safe to use the boilerplate's order of tags. - We've shortened up the Google Analytics snippet.
- Added an ARIA
role
attribute todiv#main
. This assumes your main content goes within that container. - IE9 doesn't get its own conditional class! Yay!
- Added
.focusable
helper class, which extends.visuallyhidden
to allow the element to be focusable when navigated to via the keyboard. - Anchor links are no longer reset. Basically our reset is effectively merged with Eric Meyer's recent CSS reset update, and the HTML5 Doctor reset.
- An unordered list within a
<nav>
element will no longer have a margin. - All helper classes are now after primary styles to ensure correct overrides and not be burdened with resets.
.visuallyhidden
is no longer camelCase for consistency with other classname formats.- Updated the specificity of
.visuallyhidden
to make sure it overrides all other declarations. - Removed reset on
<img>
elements within table cells as they look ugly alongside multiline texts. Browsers default to baseline alignment for images, which works better than top alignment. - Increased margin-left on
<ol>
, to allow for 2-digit list numbers. - Added a print reset on IE's proprietary filters.
- Print styles no longer prints hash links or JavaScript links.
- Updated
<sub>
/<sup>
CSS so that they're not impacted byline-height
, so now you can do sub/superscripts without worrying.
- Added a humans.txt so you can clarify authorship and tools used.
- Removed YUI profiling. You probably weren't using it anyway.
- Removed QUnit's unit tests. There is no need to ship with them, really.
- .htaccess is far more documented now. Take a read through it!
- Changed mimetype of
.ico
files toimage/x-icon
. - HTML Manifest files now use
.appcache
extension instead of.manifest
, as per http://html5.org/r/5812. - Force deflate for accept-encoding headers mangled by turtle tappers, courtesy of Yahoo!'s research
- We nerfed some of the directives in case you're on a server without
mod_headers
. (Which is totally crazy, man!) - Block access to
.git
and.svn
folders. - Eradicating Chrome's console warning on WOFF font downloads.
- More optimizations available if you set the
.htaccess
details up in yourhttpd.conf
.htaccess
now caches.htc
files
<li>Moved all server configurations (except Apache's <code>.htaccess</code>) over to <a href ="https://github.com/paulirish/html5-boilerplate-server-configs">the new html5-boilerplate-server-configs repo</a>. Head over there if you're not using Apache. </li>
<li>Updated <code>.htaccess</code> and <code>mime.types</code> for <code>ogg</code> formats.</li>
<li>Fixed regression where EOT fonts had been excluded from DEFLATE compression</li>
<li>Apache version independence: Use <code>mod_filter</code> for compression, with fallback to AddOutputFilterByType directive for legacy versions</li>
<li>Added plugin/extension mime types for Safari, Chrome, Firefox</li>
- Cleaned up cache expires directives.
- Now includes SVG and font formats for gzipping.
- expires header bug fixed.
- Added Flash video mime types to IIS server
- Fixed some mimetype weirdness that was preventing proper caching
- Also Google App Engine, Lighttpd, and NodeJS configurations were added
Basically a lot of great updates were made for 1.0. Here are all 220 commits since last release.. You may ask though, do I need to upgrade existing sites? Short answer: nah, you're good.
Mickael Daniel, Dave Kirk, Jonathan Verrecchia, nlogax, Rob Larsen, David Murdoch, AD7six, Mathias Bynens, Michael van Laar, Mike West, Mikko Tikkanen, Velir, Stephen Gariepy
Adam J. McIntyre, Adeel Ejaz, akolesnikov, Alex Dunae, Andrew Le, ashnur, Ben Truyman, Bruno Aguirre, Chris Hager, Corey Ward, Craig Barnes, crappish, Daniel Schildt, Dave DeSandro, Dustin Whittle, grigio, Irakli Nadareishvili, Jaime Bueza, Jake Ingman, James A. Rosen, Jeremy Balch, joe bartlett, Joe Sak, John Bacon Jonathan Fielding, Jonathan Neal, kblomqvist, Kenneth Nordahl, Maarten Verbaarschot, Manuel Strehl, Marcel Turi, Martin Hintzmann, mikealmond mikkotikkanen, Nic Pottier, Paul Neave, Peter Beverloo, Rick Waldron, Rob Flaherty, S Anand, Sam Sherlock, Michael Cetrulo, simshaun, Sirupsen, Stephen Gariepy, timemachine3030 , Vinay, Weston Ruter, WraithKenny, Yann Mainier, Michael van Laar, Massimo Lombardo, Ivan Nikolić , Kaelig, Richard Bradshaw, SammyK, alrra, Rizky Syazuli, iszak, aaron peters, Swaroop C H, Mike Połtyn, Marco d'Itri, Mike Lamb , BIG Folio, Philip von Bargen, Meander, Daniel Harttman, rse, timwillison, ken nordahl, Erik Dahlström, christopherjacob, Chew Choon Keat, benalman, stoyan, Markus, Vladimir Carrer, aristidesfl, Trevor Norris Miloš Gavrilović
#####Configs Dusan Hlavaty, Sean Caetano Martin, yaph, michaud, Paul Sarena, Graham Weldon, Ron. Adams
#####Translators alrra, Anton Kovalyov, Milos Gavrilovic, jorge-vitrubio, Julian Wachholz, laviperchik, lenzcom, Mathias Bynens, Mickael Daniel, Mike West, Niels Bom, Ricardo Tomasi, skill83 , Sean Caetano Martin, Yuya Saito, Zee-Julien
Major changes:
- Removed
-webkit-font-smoothing: antialiased;
it makes monospace too thin. - IE conditional classes have moved from the
<body>
tag to the<html>
tag ( #44 ). - Dropped
text-rendering: optimizeLegibility
as it breaks small-caps, looks odd on Linux machines, and goes invisible on WebOS. - Added a IE6 call for the minified
dd_belatedpng
. - Revised viewport declaration to allow user scaling and clear Webkit console errors ( #37 ).
- Updated Modernizr to 1.6
- Added
web.config
file for Microsoft IIS - Beta release of the Build Script (this is HUGE)
- New project scaffolding bash script.
- Updated Modernizr to 1.6 (smaller and faster)
- Added web.config file for Microsoft IIS. Now forcing latest IE version and ChromeFrame, if installed.
- Added
favicon
anddefault icon
for iOS. - Updated
crossdomain.xml
wording for better security guidelines ( #124 ). - Expires value for
nginx.conf
corrected. - License clarified.
- Removed
-webkit-font-smoothing: antialiased
as it made monospace too thin. - Updated fonts normalization to YUI 3.2.0 PR1.
- Table Header set explicitly for IE6, and table row now has
page-break: avoid
in print CSS. text-shadow:none !important
set for all text in print CSS.- Removed scrollbar from
<textarea>
s in IE. - Fixed
<textarea>
stylings and form field treatment for validity. Added defaultbackground-color
. - New robust clearfix solution without IE 5.5 hack ( #45 #126 ).
- Margins for form-elements explicitly set to
0
as webkit adds 2px space around form elements' chrome. - Dropped
text-rendering: optimizeLegibility
as it breakssmall-caps
and looks odd on Linux machines. - Lists now have a left margin of
1.8em
. Defaultlist-style-type
for ordered list isdecimal
. - Image Replacement now works with right-to-left text ( #68 ).
- Removed "Star Hack" for checkboxes in favor of
.ie7
selector.
- IE conditional classes have moved from the
<body>
tag to the<html>
tag ( #44 ). - Added a IE6 call for the minified
dd_belatedpng
. - Google Analytics script will now work with SSL in IE6.
- Added protocol independent absolute path for cdn jquery, with improved fallback-to-local code to protect against edge case IE bug.
- Commented out handheld CSS ( #73 ).
- Mobile viewport and textsize styles adjusted per group feedback ( #37 ).
- More files are served via gzip like
.htc
( #55 ). - Added Expires header for content types image/gif and video/webm.
- Fixed favicon display in IE6 ( #113 ).
- Corrected mimetypes for fonts.
- Removed caching for files of type json/xml.
- Better use of
ifmodule
for more stability in different Apache environments.
View full diff and commit history
Shi Chuan, Rob Larsen, Ivan Nikolić, Mikko Tikkanen, Velir, Paul Neave, Weston Ruter, Jeffrey Barke, Robert Meissner, SirFunk, Philip von Bargen, Kroc Camen, Rick Waldron, Andreas Madsen, Marco d'Itri, Adeelejaz, James Rosen, Dave DeSandro, Ken Newman, Daniel Lenz, Swaroop C H, Yann Mainier, Joe Sak, Irakli, Rob Flaherty, Jeff Starr, Mike Lamb, Holek, Aaron Peters, Kaelig, Meander, Charlie Ussery, Ciney, Région Wallonne, Sirupsen, and Paul Hayes.
- HTML5 Boilerplate is now in the Public Domain
- Nginx configuration added
- Font stacks (sans-serif and monospace) simplified
- Very accessible
a:focus
styles. - Corrected IE=edge,chromeframe enabling (As a result, the base HTML does not validate)
- ServerSideIncludes disabled by default.
- Apache config bugfixes
- Conditional body tag class combined
- dd_belatedPNG updated to 0.0.8. Redundant BackgroundImageCache fix removed.
View full diff and commit history
voodootikigod, garowetz, fearphage, christopherjacob, mathias bynens, daniel harttman, rse, chris dary, erik dahlstrom, timwillison, kenneth nordahl, riddle, elcuervo, andreas kuckartz, 3rdEden, riley willis, majic3
Major components:
- Modernizr: MIT/BSD license
- jQuery: MIT/GPL license
- DD_belatedPNG: MIT license
- YUI Profiling: BSD license
- HTML5Doctor CSS reset: Public Domain
- CSS Reset Reloaded: Public Domain
Everything else:
- The Unlicense (aka: public domain)
This is a set of files that a front-end developer can use to get started on a website, with following included:
- Cross-browser compatible (IE6? Yeah, we got that.)
- HTML5 ready. Use the new tags with certainty.
- Optimal caching and compression rules for Grade-A performance
- Best practice site configuration defaults
- Think there's too much? The HTML5 Boilerplate is delete-key friendly. :)
- Mobile browser optimizations
- Progressive enhancement graceful degredation ........ yeah yeah we got that
- IE-specific classes for maximum cross-browser control
- Want to write unit tests but lazy? A full, hooked up test suite is waiting for you.
- Javascript profiling…in IE6 and IE7? Sure, no problem.
- Console.log nerfing so you won't break anyone by mistake.
- Never go wrong with your doctype or markup!
- An optimal print stylesheet, performance optimized
- iOS, Android, Opera Mobile-adaptable markup and CSS skeleton.
- IE6 pngfix baked in.
- jQuery, waiting for you
There are two releases: a documented release (which is exactly what you see here), and a "stripped" release (with most of the descriptive comments stripped out).
Watch the current tickets to view the areas of active development.