README.md

DEPRECATED

Compass is deprecated, so this project is, too. If you've some bizarre need to use it, it ought to still work as of Compass 1.0.3. Also note this there has been an update to H5BP upstream since this release, but the Normalize code reflected here is compliant to 7.0, the current version as of Sep 2017.

An HTML5 Boilerplate Extension for Compass

This gem provides only the CSS mixins and not the HTML or JavaScript templates. Implementation of these and similar files ought to be managed by the framework and language your project is built upon.

Installation

Two options:

Install using gem:
gem install compass-h5bp

Or, if you're using Bundler, you can install it via bundle install after placing the following line in your Gemfile: gem 'compass-h5bp'

Usage

First, you must add the plugin to your config.rb (your Compass configuration file). This can be done be placing an
import line at the top of the file and is required to add the Compass plugin to the Sass load paths:

require 'compass-h5bp'

Inside your SCSS (or Sass) file, you must import the h5bp compass library before you can use any of the mixins:

@import "h5bp";

Simple Implementation

Advanced Implementation

To selectively import only certain elements, observe the following order. This ensures your custom modifications to the HTML Boilerplate styles will work as expected, by following the outline provided in the upstream HTML5 Boilerplate CSS.

Include the mixins that make up the Normalize portion of the HTML5
Boilerplate styles. You can include all of Normalize at once:

There are also specific mixins provided in h5bp-helpers you can call instead.

Include h5bp's predefined print style media query:

@include h5bp-media;

Caveats

If you're coming from a previous version, be aware that several mixins have had their name changed, and any mixin or feature that had been marked for deprecation has been removed. That being said, migration should be relatively simple.

The order for the "Advanced Implementation" matters. It's important to note that "custom modifications to the HTML5 Boilerplate styles" means only that - the rest of your SCSS goes below everything listed.