sanitize.css

A minimal and customizable CSS normalization library


Keywords
sanitize, normalize, front-end, css, less
License
MIT
Install
bower install sanitize.css

Documentation

Sanitize.css

Build Status devDependency Status

A minimal CSS normalization library

Based on Normalize.css.

Download

CDN

  • cdnjs
  • jsDelivr (latest at //cdn.jsdelivr.net/sanitize.css/latest/sanitize.min.css)

Core changes

(compared to Normalize.css)

  • Modules
  • CSSComb support
  • Improved display definitions
  • Consistent element styles
  • Improved vertical align of embedded content
  • Responsive images

Browser support

  • Chrome (latest)
  • Firefox (latest)
  • Opera 12+
  • Safari 6+
  • Internet Explorer 9+

Compile

Sanitize.css uses Grunt to compile Less code.

Dependencies

You need node.js to use Grunt.

From the command line:

  1. Install grunt-cli globally with [sudo] npm install -g grunt-cli.
  2. Run npm install from the root Sanitize.css directory to install dependencies.

When completed, you'll be able to run the various Grunt commands provided from the command line.

Modules

Modules are individual files within src/, without a .less extension.

  • base
  • display
  • text
  • embed
  • forms
  • tables

Commands

Default: grunt [--modules="module..."]

Compiles Less files.

--modules is a space-separated list of modules. If --modules option is used, Grunt will only compile specified modules.

Watch: grunt watch [--modules="module..."]

Watches Less files and recompiles them when they're changed.

License

MIT © Zlatan Vasović