Socket
Socket
Sign inDemoInstall

postcss-shared-values

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    postcss-shared-values

A comma-separated shorthand for CSS properties that share the same value.


Version published
Maintainers
1
Install size
1.58 MB
Created

Readme

Source

PostCSS Shared Values

Travis build status

A PostCSS plugin that allows for a comma-separated shorthand for properties that share the same value.

Install

npm install --save-dev postcss-shared-values or yarn add -D postcss-shared-values

Usage examples

Input CSS:

.foo {
  height, width: 100px;
}

Output CSS:

.foo {
  height: 100px;
  width: 100px;
}

Try it out.

An example is available in this repository. Use npm run example or yarn example to try it out.

Is this a good idea?

Maybe, maybe not. This plugin encourages an invalid CSS syntax, which may be confusing to some users. However, it also encourages the user to explicitly group properties that are meant to share the same value, which may be helpful from a code maintenance standpoint. It's also a convenient shorthand.

Keywords

FAQs

Last updated on 26 Jun 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc