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

postcss-beard-colors

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

postcss-beard-colors - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

43

index.js

@@ -5,30 +5,31 @@ var postcss = require('postcss')

var prefixes = {
bg: 'background-color',
tc: 'color',
bc: 'border-color',
bg: 'background-color',
tc: 'color',
bc: 'border-color',
f: 'fill',
}
module.exports = postcss.plugin('postcss-beard-colors', function(opts) {
opts = opts || {}
opts = opts || {}
var colors = opts.colors
var colors = opts.colors
return function(root, result) {
var rules = _.flatMap(prefixes, function(declProp, prefixKey) {
return _.flatMap(colors, function(colorValue, colorKey) {
return postcss
.rule({
selector: `.${prefixKey}${colorKey}`,
})
.append(
postcss.decl({
prop: declProp,
value: colorValue,
return function(root, result) {
var rules = _.flatMap(prefixes, function(declProp, prefixKey) {
return _.flatMap(colors, function(colorValue, colorKey) {
return postcss
.rule({
selector: `.${prefixKey}${colorKey}`,
})
.append(
postcss.decl({
prop: declProp,
value: colorValue,
})
)
})
)
})
})
})
root.append(rules)
}
root.append(rules)
}
})
{
"name": "postcss-beard-colors",
"version": "0.0.1",
"version": "0.0.2",
"description": "PostCSS plugin to generate utility helpers from a color scale",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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