tailwindcss-pseudo-elements
Advanced tools
Comparing version
@@ -1,5 +0,5 @@ | ||
const pseudoElements = require('./pseudo-elements') | ||
const { pseudoElements, hasPluginFactory } = require('./lib') | ||
module.exports = function({addVariant, e}) { | ||
const escape = e || (x => x) | ||
function plugin({addVariant, e}) { | ||
const escape = hasPluginFactory ? e : (x => x) | ||
pseudoElements.forEach(pseudo => { | ||
@@ -13,1 +13,3 @@ addVariant(pseudo, ({modifySelectors, separator}) => { | ||
} | ||
module.exports = hasPluginFactory ? require('tailwindcss/plugin')(plugin) : plugin |
{ | ||
"name": "tailwindcss-pseudo-elements", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "TailwindCSS Plugin that adds variants of pseudo elements.", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/yutahaga/tailwindcss-pseudo-elements.git" | ||
"url": "git+https://github.com/croutonn/tailwindcss-pseudo-elements.git" | ||
}, | ||
@@ -14,8 +14,20 @@ "keywords": [ | ||
], | ||
"author": "Yuta Haga", | ||
"author": "@croutonn", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/yutahaga/tailwindcss-pseudo-elements/issues" | ||
"url": "https://github.com/croutonn/tailwindcss-pseudo-elements/issues" | ||
}, | ||
"homepage": "https://github.com/yutahaga/tailwindcss-pseudo-elements#readme" | ||
"homepage": "https://github.com/croutonn/tailwindcss-pseudo-elements#readme", | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"mocha": "^8.1.3", | ||
"postcss": "^8.1.0", | ||
"tailwindcss": "^1.8.10" | ||
}, | ||
"peerDependencies": { | ||
"tailwindcss": ">=0.7.4" | ||
} | ||
} |
@@ -10,2 +10,3 @@ # tailwindcss-pseudo-elements | ||
#### NPM | ||
```sh | ||
@@ -16,2 +17,3 @@ npm install tailwindcss-pseudo-elements --save-dev | ||
#### Yarn | ||
```sh | ||
@@ -25,17 +27,17 @@ yarn add tailwindcss-pseudo-elements -D | ||
module.exports = { | ||
modules: [ | ||
textColors: ['responsive', 'hover', 'focus', 'before', 'after'], | ||
], | ||
variants: { | ||
textColor: ["responsive", "hover", "focus", "before", "after"], | ||
}, | ||
plugins: [ | ||
require('tailwindcss-pseudo-elements'), | ||
require("tailwindcss-pseudo-elements"), | ||
// This plugin is useful in combination with tailwindcss-aspect-ratio. | ||
require('tailwindcss-aspect-ratio')({ | ||
require("tailwindcss-aspect-ratio")({ | ||
ratios: { | ||
'16/9': [16, 9], | ||
'4/3': [4, 3], | ||
'3/2': [3, 2], | ||
'1/1': [1, 1], | ||
"16/9": [16, 9], | ||
"4/3": [4, 3], | ||
"3/2": [3, 2], | ||
"1/1": [1, 1], | ||
}, | ||
variants: ['before', 'responsive'] | ||
variants: ["before", "responsive"], | ||
}), | ||
@@ -45,11 +47,11 @@ function ({ addUtilities }) { | ||
{ | ||
'.empty-content': { | ||
content: "''" | ||
} | ||
".empty-content": { | ||
content: "''", | ||
}, | ||
}, | ||
['before'] | ||
) | ||
} | ||
] | ||
} | ||
["before"] | ||
); | ||
}, | ||
], | ||
}; | ||
``` | ||
@@ -56,0 +58,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3780
14.93%34
21.43%62
3.33%1
Infinity%4
Infinity%5
-16.67%1
Infinity%