# bianco.css

> [![Build Status][ci-image]][ci-url] [![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-url] [![MIT License][license-image]][license-url]

Latest version **1.1.0** (published 2022-03-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install bianco.css
pnpm add bianco.css
yarn add bianco.css
bun add bianco.css
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-03-10 |
| First published | 2017-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nils Solanki |
| Maintainers | gianlucaguarini, nirazul, nilssolanki |
| Keywords | es6, es2015 |

## Links

- npm: https://www.npmjs.com/package/bianco.css
- Repository: https://github.com/biancojs/css
- Homepage: https://github.com/biancojs/css#readme
- Issues: https://github.com/biancojs/css/issues
- npm.io page: https://npm.io/package/bianco.css

## Dependencies (1)

- [bianco.dom-to-array](https://npm.io/package/bianco.dom-to-array.md) 1.1.0

## Recent versions

- 1.1.0 (latest) — 2022-03-10
- 1.0.0 — 2018-12-01
- 0.0.4 — 2018-06-03
- 0.0.3 — 2018-05-03
- 0.0.1 — 2017-09-15
- 0.0.0 — 2017-09-15

## README

# bianco.css

[![Build Status][ci-image]][ci-url]
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-url]
[![MIT License][license-image]][license-url]

## Usage

```js
import css from 'bianco.css'
```

[ci-image]:https://img.shields.io/github/workflow/status/biancojs/css/test?style=flat-square
[ci-url]:https://github.com/biancojs/css/actions

[license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square

[license-url]: LICENSE

[npm-version-image]: http://img.shields.io/npm/v/bianco.css.svg?style=flat-square

[npm-downloads-image]: http://img.shields.io/npm/dm/bianco.css.svg?style=flat-square

[npm-url]: https://npmjs.org/package/bianco.css

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

-   [set](#set)
    -   [Parameters](#parameters)
    -   [Examples](#examples)
-   [get](#get)
    -   [Parameters](#parameters-1)
    -   [Examples](#examples-1)
-   [remove](#remove)
    -   [Parameters](#parameters-2)
    -   [Examples](#examples-2)

### set

Set any css property on a single node or a list of DOM nodes.

#### Parameters

-   `els` **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
-   `name` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))** either the name of the property to set
                                                    or a list of properties as object key - value
-   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the new value of the property (optional)

#### Examples

```javascript
import { set } from 'bianco.css'

const img = document.createElement('img')

set(img, 'width', 100)

// or also
set(img, {
  width: 300,
  height: 300
})
```

Returns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** the original array of elements passed to this function.

### get

Get any property from a single node or a list of DOM nodes.

#### Parameters

-   `els` **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
-   `names` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of properties to get

#### Examples

```javascript
import { get } from 'bianco.css'

const img = document.createElement('img')

get(img, 'width') // => '200'

// or also
get(img, ['width', 'height']) // => {width: '200', height: '300'}

// or also
get([img1, img2], ['width', 'height']) // => [{width: '200', height: '300'}, {width: '500', height: '200'}]
```

Returns **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** list of the properties found.

### remove

Remove any css property from a single node or a list of DOM nodes.

#### Parameters

-   `els` **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** DOM node/s to parse
-   `names` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** name or list of properties to remove

#### Examples

```javascript
import { remove } from 'bianco.css'

remove(img, 'width') // remove the width property

// or also
remove(img, ['width', 'height']) // remove the width and the height property

// or also
remove([img1, img2], ['width', 'height']) // remove the width and the height property from both images
```

Returns **([HTMLElement](https://developer.mozilla.org/docs/Web/HTML/Element) \| [NodeList](https://developer.mozilla.org/docs/Web/API/NodeList) \| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array))** the original array of elements passed to this function.

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