🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

code42day-css

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code42day-css

Simple CSS manipulation.

0.3.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

css

Simple CSS manipulation.

Installation

$ component install ianstormtaylor/css

Example

var css = require('css');
var div = document.getElementById('header');

// get
css(div, 'position'); // "relative"

// set one at a time
css(div, 'position', 'fixed');

// set many at a time
css(div, {
  position: 'fixed',
  top: '24px'
});

// use dashes if you want
css(div, 'font-size', '16px');

// you can omit "px" and it will be added automatically
css(div, 'font-size', 16);

API

css(el, property)

Get the current value of a CSS property of an el.

css(el, property, value)

Set the value of a CSS property on an el.

css(el, properties)

Set the value of a dictionary of properties on an el.

License

MIT

Keywords

browser

FAQs

Package last updated on 17 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts