# nib

> Stylus mixins and utilities

Latest version **1.2.0** (published 2022-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install nib
pnpm add nib
yarn add nib
bun add nib
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2022-05-17 |
| First published | 2011-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/nib) |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Unpacked size | 202.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1884 |
| Author | TJ Holowaychuk |
| Maintainers | slang, tjholowaychuk, ichenlei |

## Links

- npm: https://www.npmjs.com/package/nib
- Repository: https://github.com/stylus/nib
- Homepage: https://github.com/stylus/nib#readme
- Issues: https://github.com/stylus/nib/issues
- npm.io page: https://npm.io/package/nib

## Recent versions

- 1.2.0 (latest) — 2022-05-17
- 1.1.2 — 2016-08-05
- 1.1.0 — 2015-01-19
- 1.0.4 — 2014-09-29
- 1.0.3 — 2014-06-19
- 1.0.2 — 2014-01-06
- 1.0.1 — 2013-08-21
- 1.0.0 — 2013-08-15
- 0.9.2 — 2013-06-25
- 0.9.1 — 2013-01-04
- 0.9.0 — 2012-11-24
- 0.8.2 — 2012-08-28
- 0.8.1 — 2012-08-21
- 0.7.1 — 2012-08-17
- 0.7.0 — 2012-07-09
- … 17 more at https://npm.io/package/nib/versions

## README

# Nib [![npm](https://img.shields.io/npm/v/nib)](https://www.npmjs.com/package/nib) [![npm](https://img.shields.io/npm/dm/nib.svg?sanitize=true)](https://www.npmjs.com/package/nib)  [![build status](https://github.com/stylus/nib/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/stylus/nib/actions?query=branch%3Amain)

  Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://stylus.github.io/nib).

## Installation

```bash
$ npm install nib
```

 If the image generation features of Nib are desired, such as generating the linear gradient images, install [node-canvas](http://github.com/learnboost/node-canvas):

```bash
$ npm install canvas
```

## JavaScript API

 Below is an example of how to utilize nib and stylus with the connect framework (or express).

```javascript
var connect = require('connect')
  , stylus = require('stylus')
  , nib = require('nib');

var server = connect();

function compile(str, path) {
  return stylus(str)
	.set('filename', path)
	.set('compress', true)
	.use(nib());
}

server.use(stylus.middleware({
	src: __dirname
  , compile: compile
}));
```

## Stylus API

  To gain access to everything nib has to offer, simply add:

  ```css
  @import 'nib'
  ```

  Or you may also pick and choose based on the directory structure in `./lib`, for example:

  ```css
  @import 'nib/gradients'
  @import 'nib/overflow'
  @import 'nib/normalize'
  ```

_To be continued..._

## More Information

  - Introduction [screencast](http://www.screenr.com/M6a)

## Testing

 You will first need to install the dependencies:

 ```bash
    $ npm install -d
 ```

 Run the automated test cases:

 ```bash
    $ npm test
 ```

 For visual testing run the test server:

 ```bash
    $ npm run-script test-server
 ```

 Then visit `localhost:3000` in your browser.

## Contributors

I would love more contributors. And if you have helped out, you are awesome! I want to give a huge thanks to these people:

  - [TJ Holowaychuk](https://github.com/tj) (Original Creator)
  - [Sean Lang](https://github.com/notslang) (Previous Maintainer)
  - [iChenLei](https://github.com/iChenLei) (Current Maintainer)
  - [Isaac Johnston](https://github.com/superstructor)
  - [Everyone Else](https://github.com/tj/nib/contributors)

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