Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bianco.css

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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]

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-86%
Maintainers
3
Weekly downloads
 
Created
Source

bianco.css

Build Status NPM version NPM downloads MIT License

Usage

import css from 'bianco.css'

API

Table of Contents

set

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

Parameters
  • els (HTMLElement | NodeList | Array) DOM node/s to parse
  • name (string | Object) either the name of the property to set or a list of properties as object key - value
  • value string the new value of the property (optional)
Examples
import { set } from 'bianco.css'

const img = document.createElement('img')

set(img, 'width', 100)

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

Returns (HTMLElement | NodeList | 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
Examples
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 | string) list of the properties found.

remove

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

Parameters
Examples
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 | NodeList | Array) the original array of elements passed to this function.

Keywords

FAQs

Package last updated on 10 Mar 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc