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

css-shorthand-expand

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-shorthand-expand

Expand CSS shorthand properties

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-11.12%
Maintainers
1
Weekly downloads
 
Created
Source

css-shorthand-expand

Build Status

Expand CSS shorthand properties to their longhand equivalent.

npm install css-shorthand-expand

Usage

The module exposes a single function which takes a property name and a value and returns a map with the expanded properties.

var expand = require('css-shorthand-expand');

expand('background', 'url(image.png) no-repeat #ff0');

The above returns an object.

{
	'background-image': 'url(image.png)',
	'background-repeat': 'no-repeat',
	'background-color': '#ff0'
}

Currently the following properties are supported.

  • background
  • font
  • padding
  • margin
  • border
  • border-width
  • border-style
  • border-color
  • border-top
  • border-right
  • border-bottom
  • border-left
  • border-radius
  • outline

Keywords

FAQs

Package last updated on 15 Apr 2018

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