# postcss-basscss

> Postcss plugin for Basscss

Latest version **0.2.3** (published 2015-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-basscss
pnpm add postcss-basscss
yarn add postcss-basscss
bun add postcss-basscss
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2015-07-14 |
| First published | 2015-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 52 |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | no |
| Author | Brent Jackson |
| Maintainers | jxnblk |
| Keywords | basscss, css, oocss, postcss |

## Links

- npm: https://www.npmjs.com/package/postcss-basscss
- npm.io page: https://npm.io/package/postcss-basscss

## Dependencies (52)

- [lodash](https://npm.io/package/lodash.md) ^3.9.1
- [basscss](https://npm.io/package/basscss.md) ^7.0.0
- [postcss](https://npm.io/package/postcss.md) ^4.1.11
- [basscss-btn](https://npm.io/package/basscss-btn.md) ^1.0.1
- [flex-object](https://npm.io/package/flex-object.md) ^2.0.1
- [specificity](https://npm.io/package/specificity.md) ^0.1.4
- [basscss-grid](https://npm.io/package/basscss-grid.md) ^1.0.3
- [postcss-calc](https://npm.io/package/postcss-calc.md) ^4.0.1
- [basscss-align](https://npm.io/package/basscss-align.md) ^1.0.0
- [basscss-colors](https://npm.io/package/basscss-colors.md) ^2.0.0
- [postcss-import](https://npm.io/package/postcss-import.md) ^5.2.2
- [basscss-borders](https://npm.io/package/basscss-borders.md) ^2.0.2
- [basscss-defaults](https://npm.io/package/basscss-defaults.md) ^2.0.1
- [basscss-progress](https://npm.io/package/basscss-progress.md) ^1.0.5
- [basscss-highlight](https://npm.io/package/basscss-highlight.md) ^0.1.0
- [basscss-positions](https://npm.io/package/basscss-positions.md) ^1.0.4
- [basscss-base-forms](https://npm.io/package/basscss-base-forms.md) ^2.0.0
- [basscss-base-reset](https://npm.io/package/basscss-base-reset.md) ^2.0.2
- [basscss-color-base](https://npm.io/package/basscss-color-base.md) ^2.0.0
- [basscss-type-scale](https://npm.io/package/basscss-type-scale.md) ^1.0.0
- [basscss-base-tables](https://npm.io/package/basscss-base-tables.md) ^1.0.0
- [basscss-btn-outline](https://npm.io/package/basscss-btn-outline.md) ^1.0.0
- [basscss-btn-primary](https://npm.io/package/basscss-btn-primary.md) ^1.0.0
- [basscss-button-link](https://npm.io/package/basscss-button-link.md) ^1.2.3
- [basscss-color-forms](https://npm.io/package/basscss-color-forms.md) ^3.0.0
- [basscss-input-range](https://npm.io/package/basscss-input-range.md) ^1.1.5
- [basscss-white-space](https://npm.io/package/basscss-white-space.md) ^1.1.2
- [basscss-base-buttons](https://npm.io/package/basscss-base-buttons.md) ^1.1.0
- [basscss-button-sizes](https://npm.io/package/basscss-button-sizes.md) ^1.0.6
- [basscss-button-solid](https://npm.io/package/basscss-button-solid.md) ^1.0.0
- [basscss-color-tables](https://npm.io/package/basscss-color-tables.md) ^1.0.2
- [basscss-table-object](https://npm.io/package/basscss-table-object.md) 0.0.7
- [postcss-custom-media](https://npm.io/package/postcss-custom-media.md) ^3.0.0
- [basscss-border-colors](https://npm.io/package/basscss-border-colors.md) ^1.0.0
- [basscss-color-buttons](https://npm.io/package/basscss-color-buttons.md) ^1.0.1
- [basscss-button-outline](https://npm.io/package/basscss-button-outline.md) ^1.1.0
- [basscss-color-progress](https://npm.io/package/basscss-color-progress.md) ^1.0.0
- [basscss-utility-layout](https://npm.io/package/basscss-utility-layout.md) ^2.0.3
- [postcss-color-function](https://npm.io/package/postcss-color-function.md) ^1.2.0
- [basscss-base-typography](https://npm.io/package/basscss-base-typography.md) ^2.0.1
- [basscss-color-forms-dark](https://npm.io/package/basscss-color-forms-dark.md) ^1.1.0
- [basscss-utility-headings](https://npm.io/package/basscss-utility-headings.md) 0.0.6
- [postcss-remove-mutations](https://npm.io/package/postcss-remove-mutations.md) ^0.1.1
- [basscss-background-colors](https://npm.io/package/basscss-background-colors.md) ^1.0.0
- [basscss-background-images](https://npm.io/package/basscss-background-images.md) 0.0.9
- [basscss-color-input-range](https://npm.io/package/basscss-color-input-range.md) ^1.0.0
- [basscss-responsive-states](https://npm.io/package/basscss-responsive-states.md) ^1.0.3
- [basscss-ui-utility-groups](https://npm.io/package/basscss-ui-utility-groups.md) ^1.0.1
- [postcss-custom-properties](https://npm.io/package/postcss-custom-properties.md) ^3.3.0
- [basscss-button-transparent](https://npm.io/package/basscss-button-transparent.md) ^1.1.0
- [basscss-utility-typography](https://npm.io/package/basscss-utility-typography.md) ^2.0.0
- [basscss-responsive-white-space](https://npm.io/package/basscss-responsive-white-space.md) 0.0.1

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.2.3 (latest) — 2015-07-14
- 0.2.2 — 2015-07-10
- 0.2.1 — 2015-07-10
- 0.2.0 — 2015-07-10
- 0.1.0 — 2015-07-09

## README

# postcss-basscss

PostCSS plugin for [Basscss](http://basscss.com)

Prepends Basscss modules to the beginning of a stylesheet,
enforcing Basscss immutability and removing ID selectors.

## Usage

```js
var fs = require('fs')
var postcss = require('postcss')
var basscss = require('postcss-basscss')

var src = fs.readFileSync('css/input.css', 'utf8')

var options = {
  customProperties: {
    variables: {
      'font-family': '"Avenir Next", "Helvetica Neue", sans-serif'
    }
  }
}

var output = postcss()
  .use(basscss(options))
  .process(src)
  .css

console.log(output)
```

## Basscss Conformance

This plugin **comments out rules** and throws a warning when one of the following occurs:

- A Basscss class selector is mutated – i.e. another ruleset uses the same class name
- An ID selector is used

## Options

### `modules`

An object to enable and disable Basscss modules.

```js
// example
postcss()
  .use(basscss({
    modules: {
      'basscss-responsive-white-space': true,
      'basscss-colors': false
    }
  })
```

### `raw`

Type: `Boolean`
Default `false`

When set to true, this option disables the use of `postcss-custom-media`, `postcss-custom-properties`, `postcss-calc`, and `postcss-color-function` when processing the Basscss source modules. This is useful when defining custom properties in a custom stylesheet.

When using this option, it is recommended to process the results with these plugins or cssnext to ensure browser compatibility.

### `immutable`

Type: `Boolean`
Default: `true`

When set to `true`, mutations on Basscss styles are commented out.

### `removeIds`

Type: `Boolean`
Default: `true`

When set to `true`, rulesets with ID selectors are commented out.

### `import`

Type: `Object`
Default: `{}`

Passes options to the [postcss-import](https://github.com/postcss/postcss-import) plugin when processing Basscss.

### `customMedia`

Type: `Object`
Default: `{}`

Passes options to the [postcss-custom-media](https://github.com/postcss/postcss-custom-media) plugin when processing Basscss.

### `customProperties`

Type: `Object`
Default: `{}`

Passes options to the [postcss-custom-properties](https://github.com/postcss/postcss-custom-properties) plugin when processing Basscss.

### `calc`

Type: `Object`
Default: `{}`

Passes options to the [postcss-calc](https://github.com/postcss/postcss-calc) plugin when processing Basscss.

### `colorFunction`

Type: `Object`
Default: `{}`

Passes options to the [postcss-color-function](https://github.com/postcss/postcss-color-function) plugin when processing Basscss.


MIT License

---
_Source: https://npm.io/package/postcss-basscss · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
