Socket
Socket
Sign inDemoInstall

postcss-initial

Package Overview
Dependencies
14
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.1 to 1.5.2

7

CHANGELOG.md

@@ -8,3 +8,8 @@ # Change Log

# [1.5.1] - 2016-04-09
## [1.5.2] - 2016-07-20
Fix rules duplication in case when user added own fallback for rule.
See [#18](https://github.com/maximkoretskiy/postcss-initial/issues/18).
Thanks to @ChaosExAnima for suggestion and PR.
## [1.5.1] - 2016-04-09
Added support of multiple initial values in property. Thanks to @johnbender for issue and contribution.

@@ -11,0 +16,0 @@

@@ -9,2 +9,11 @@ var postcss = require('postcss');

var getFallback = makeFallbackFunction(opts.reset === 'inherited');
var getPropPrevTo = function (prop, decl) {
var foundPrev = false;
decl.parent.walkDecls(function (child) {
if (child.prop === decl.prop && child.value !== decl.value) {
foundPrev = true;
}
});
return foundPrev;
};
return function (css) {

@@ -18,3 +27,5 @@ css.walkDecls(function (decl) {

fallBackRules.forEach(function (rule) {
decl.cloneBefore(rule);
if ( !getPropPrevTo(decl.prop, decl) ) {
decl.cloneBefore(rule);
}
});

@@ -21,0 +32,0 @@ if (opts.replace === true) {

2

package.json
{
"name": "postcss-initial",
"version": "1.5.1",
"version": "1.5.2",
"description": "PostCSS plugin to fallback initial keyword.",

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

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