Gathering detailed insights and metrics for posthtml-postcss-merge-longhand
Gathering detailed insights and metrics for posthtml-postcss-merge-longhand
Gathering detailed insights and metrics for posthtml-postcss-merge-longhand
Gathering detailed insights and metrics for posthtml-postcss-merge-longhand
Merge longhand properties from inline CSS into shorthand with PostCSS.
npm install posthtml-postcss-merge-longhand
Typescript
Module System
Min. Node Version
Node Version
NPM Version
91.9
Supply Chain
98.8
Quality
77.8
Maintenance
100
Vulnerability
100
License
JavaScript (66.63%)
HTML (26.72%)
TypeScript (6.65%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
340 Commits
1 Forks
4 Watchers
3 Branches
10 Contributors
Updated on May 06, 2025
Minified
Minified + Gzipped
Latest Version
3.1.3
Package Id
posthtml-postcss-merge-longhand@3.1.3
Unpacked Size
7.61 kB
Size
2.77 kB
File Count
6
NPM Version
10.2.4
Node Version
20.10.0
Published on
Dec 16, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
This plugin uses postcss-merge-longhand to merge longhand CSS properties in style=""
attributes to shorthand.
Input:
1<div style="margin-top: 1px; margin-right: 2px; margin-bottom: 3px; margin-left: 4px;">Test</div>
Output:
1<div style="margin: 1px 2px 3px 4px;">Test</div>
$ npm i posthtml posthtml-postcss-merge-longhand
1import posthtml from 'posthtml' 2import mergeInlineLonghand from 'posthtml-postcss-merge-longhand' 3 4const html = '<div style="margin-top: 1px; margin-right: 2px; margin-bottom: 3px; margin-left: 4px;">Test</div>' 5 6posthtml([ mergeInlineLonghand() ]) 7 .process(html) 8 .then(result => console.log(result.html)) 9 10 // <div style="margin: 1px 2px 3px 4px;">Test</div>
Both ESM and CJS exports are provided, you can also require
the module:
1const posthtml = require('posthtml') 2const mergeInlineLonghand = require('posthtml-postcss-merge-longhand') 3 4// ...
tags
Type: array
Default: []
Array of tag names to process. All other tags will be skipped.
Example:
1import posthtml from 'posthtml' 2import mergeInlineLonghand from 'posthtml-postcss-merge-longhand' 3 4const html = ` 5 <div style="margin-top: 1px; margin-right: 2px; margin-bottom: 3px; margin-left: 4px;">Test</div> 6 <p style="margin-top: 1px; margin-right: 2px; margin-bottom: 3px; margin-left: 4px;">Test</p> 7` 8 9posthtml([ mergeInlineLonghand({tags: ['div']}) 10 ]) 11 .process(html) 12 .then(result => console.log(result.html)) 13 14 // <div style="margin: 1px 2px 3px 4px;">Test</div> 15 // <p style="margin-top: 1px; margin-right: 2px; margin-bottom: 3px; margin-left: 4px;">Test</p>
No vulnerabilities found.
Reason
22 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 0/1 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More