Basscss is a collection of interoperable CSS modules and can be used in conjunction with many other frameworks, libraries, and stylesheets.

# Rework

Rework is the most native way to incorporate Basscss into a project, and its concepts should be somewhat familiar to those who use other preprocessors, such as Sass or Less, and to those who are comfortable with the command line.

Rework is a Node-based preprocessor with a plugin architecture and syntax based on the CSS specification. Rework requires NPM, and Basscss uses this package management system for its modular architecture. If you prefer using Bower, see the Bower Section below.

## Bassplate

The quickest way to get familiar with using Rework is through the official boilerplate project Bassplate, which includes Gulp tasks and basic file and folder structure for building a simple website.

To get started, clone the repo, install dependencies, and run the default Gulp task.

    git clone https://github.com/jxnblk/bassplate.git new-project
    cd new-project
    rm -rf .git
    npm install
    gulp

This will start a server at `http://localhost:8000` and watch the `/src` folder for changes. Edit the files in `/src/css` to customize the compiled stylesheet.

## Basswork

Basswork is a CSS preprocessor for Basscss built with Rework. To set up Basscss in an existing Node-base build system, use Basswork or Gulp Basswork to compile a set of modules.

## NPM Packages

All individual Basscss modules are available on NPM. For a list of available packages, see the Modules page.

# Rework Syntax

To import modules that have been installed through NPM, use the following syntax:

    @import 'basscss-base-typography';
    @import 'basscss-defaults';

To import modules relative to the parent file, use this syntax:

    @import './custom-buttons';

Import variables last. Just as with other CSS declarations, whatever is last in the source code is used.

    @import 'basscss-utility-layout';
    @import './variables';

To use variables in declarations, follow this CSS syntax:

    .button-primary {
      background-color: var(--blue);
    }

For more, see the Using Rework page.

# Sass

The core package includes the standard modules as Sass partials in the `scss` folder. Import individual modules in your own file as needed, with the default variables file first.

    @import: 'basscss/scss/defaults';
    @import: 'basscss/scss/utility-layout';

To override the default values, include your own variable definitions before Basscss.

    // Custom variables
    @import: 'variables';

    // Basscss
    @import: 'basscss/scss/defaults';
    @import: 'basscss/scss/utility-layout';

## Sass with Bower

Although Basscss’s individual modules are distributed through NPM, the core package is available through Bower, which contains the compiled CSS as well as the standard set of modules as Sass partials.

To get started, install the package:

    bower install basscss

To import modules without specifying the Bower folder, add `bower_components/basscss/scss` to the `includePaths` option.

    var options = {
      includePaths: ['bower_components/']
    }

    @import "basscss/scss/defaults";
    @import "basscss/scss/base-reset";
    @import "basscss/scss/base-typography";

# Web App

If you’re not ready to dive into the command line, you can create custom builds of Basscss with the web app.

Customize
Rework Rework Syntax Sass Web App