# cssobject-from-selector

> Pass an object defining css a function will be returned. Pass selectors to the returned function to get merged css objects

Latest version **1.0.2** (published 2015-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install cssobject-from-selector
pnpm add cssobject-from-selector
yarn add cssobject-from-selector
bun add cssobject-from-selector
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-05-04 |
| First published | 2015-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mikko Haapoja |
| Maintainers | mikkoh |
| Keywords | object,css,selector |

## Links

- npm: https://www.npmjs.com/package/cssobject-from-selector
- Repository: https://github.com/Jam3/cssobject-from-selector
- Issues: https://github.com/Jam3/cssobject-from-selector/issues
- npm.io page: https://npm.io/package/cssobject-from-selector

## Dependencies (2)

- [merge](https://npm.io/package/merge.md) ^1.2.0
- [parse-selector](https://npm.io/package/parse-selector.md) ^1.0.0

## Recent versions

- 1.0.2 (latest) — 2015-05-04
- 1.0.1 — 2015-03-31
- 1.0.0 — 2015-03-30

## README

# cssobject-from-selector

[![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

Pass an object defining css a function will be returned. Pass selectors to the returned function to get merged css objects

## Usage

[![NPM](https://nodei.co/npm/cssobject-from-selector.png)](https://www.npmjs.com/package/cssobject-from-selector)

```javascript
var cssFromSelector = require('cssobject-from-selector');

var getCSS = cssFromSelector( {

    'div': {
        width: '100px'
    },

    'ul': {
        width: '50px'
    },

    '.red': {
        color: '#F00'
    },

    '.red.tall': {
        height: '100px'
    },

    '.red.small': {
        height: '50px'
    }
});

var css = getCSS('div.red.tall');

// css will be
// {
//  width: '100px',
//  height: '100px',
//  color: '#F00'
// }
```

## License

MIT, see [LICENSE.md](http://github.com/Jam3/cssobject-from-selector/blob/master/LICENSE.md) for details.

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