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

shrt-css

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shrt-css

Makes your CSS files lighter and more readable by converting and combining CSS properties into their shorthand versions when possible.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
123
decreased by-3.91%
Maintainers
1
Weekly downloads
 
Created
Source

shrthnd.js

Makes your CSS files lighter and more readable by converting and combining properties into their shorthand versions when possible.

Installation

npm install shrthnd

Usage

The module takes a CSS string as only parameter and returns an object containing two properties:

  • string: The shorthanded CSS string
  • longPropertiesPositions: An array containing the position (row & column in input string) of the properties that have been shorthanded

Example

var cssString = 'body { background-image: url(/img/meow.jpg); background-position: top center; }';

var shrthnd = require('shrthnd');
var shorthandedCss = shrthnd(cssString);
console.log(shorthandedCss.string);

Keywords

FAQs

Package last updated on 25 Jun 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