Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/component/css

DOM element css helper
https://github.com/component/css

Last synced: 12 days ago
JSON representation

DOM element css helper

Awesome Lists containing this project

README

        

# css

jQuery's [css()](http://api.jquery.com/css/) method.

## Installation

Install with [component(1)](http://component.io):

$ component install component/css

## API

### css(el, prop)

Get the computed value of the `prop` on `el`.

```js
css(p, 'color')
```

### css(el, prop, value)

Set the CSS `value` on the `prop` on `el`

```js
css(p, 'color', 'red')
```

### css(el, styles)

Set a `styles` object to `el`

```js
css(p, {
color: 'red',
background: 'blue'
})
```

## TODO

- Finish porting jQuery [css unit tests](https://github.com/jquery/jquery/blob/master/test/unit/css.js) over

## License

MIT