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

postcss-merge-longhand

Package Overview
Dependencies
Maintainers
7
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-merge-longhand

Merge longhand properties into shorthand with PostCSS.

  • 7.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11M
increased by4.85%
Maintainers
7
Weekly downloads
 
Created

What is postcss-merge-longhand?

The postcss-merge-longhand package is a PostCSS plugin that merges longhand CSS properties into shorthand properties. This helps in reducing the size of the CSS by combining multiple longhand properties into a single shorthand property where possible.

What are postcss-merge-longhand's main functionalities?

Merge Margin Properties

This feature merges individual margin properties (margin-top, margin-right, margin-bottom, margin-left) into a single shorthand margin property.

/* Input CSS */
{
  margin-top: 10px;
  margin-right: 20px;
  margin-bottom: 10px;
  margin-left: 20px;
}

/* Output CSS */
{
  margin: 10px 20px;
}

Merge Padding Properties

This feature merges individual padding properties (padding-top, padding-right, padding-bottom, padding-left) into a single shorthand padding property.

/* Input CSS */
{
  padding-top: 5px;
  padding-right: 10px;
  padding-bottom: 5px;
  padding-left: 10px;
}

/* Output CSS */
{
  padding: 5px 10px;
}

Merge Border Properties

This feature merges individual border properties (border-width, border-style, border-color) into a single shorthand border property.

/* Input CSS */
{
  border-width: 1px;
  border-style: solid;
  border-color: black;
}

/* Output CSS */
{
  border: 1px solid black;
}

Other packages similar to postcss-merge-longhand

Keywords

FAQs

Package last updated on 04 Sep 2024

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