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

postcss-mixins

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-mixins - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

3

CHANGELOG.md

@@ -0,1 +1,4 @@

## 5.0.1
* Use globby 6 and PostCSS 5.1.
## 5.0

@@ -2,0 +5,0 @@ * Use `postcss-simple-vars` 3.0 with special syntax for comment variables

10

package.json
{
"name": "postcss-mixins",
"version": "5.0.0",
"version": "5.0.1",
"description": "PostCSS plugin for mixins",

@@ -18,9 +18,9 @@ "keywords": [

"postcss-js": "^0.1.3",
"postcss": "^5.0.21",
"globby": "^5.0.0"
"postcss": "^5.1.2",
"globby": "^6.0.0"
},
"devDependencies": {
"eslint-config-postcss": "^2.0.2",
"eslint": "^2.13.1",
"ava": "^0.15.2"
"eslint": "^3.3.0",
"ava": "^0.16.0"
},

@@ -27,0 +27,0 @@ "scripts": {

@@ -147,3 +147,3 @@ # PostCSS Mixins [![Build Status][ci-img]][ci]

mixins: {
hidpi: function (path) {
image: function (mixin, path) {
return {

@@ -164,2 +164,18 @@ '&': {

Mixin body will be in `mixin.nodes`:
```
var postcss = require('postcss');
require('postcss-mixins')({
mixins: {
hover: function (mixin) {
let rule = postcss.rule({ selector: '&:hover', '&.hover' });
rule.append(mixin.nodes);
mixin.replaceWith(rule);
}
}
}
```
Or you can use object instead of function:

@@ -183,14 +199,2 @@

**Note**: When you need to pass arguments to a mixin, ensure you pass `rule`
as your first argument. For example:
````js
spinner: function (rule, background, highlight) {
return {
border: '2px solid ' + background,
borderLeftColor: highlight
};
}
````
## Options

@@ -197,0 +201,0 @@

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