@vunamhung/tailwind-config
Advanced tools
Comparing version 0.9.6 to 0.9.7
{ | ||
"name": "@vunamhung/tailwind-config", | ||
"version": "0.9.6", | ||
"version": "0.9.7", | ||
"description": "Tailwind CSS plugin to modify default config", | ||
@@ -20,4 +20,4 @@ "main": "src/index.js", | ||
"release-it": "^12.4.3", | ||
"tailwindcss": "^1.2.0" | ||
"tailwindcss": "^1.7.5" | ||
} | ||
} |
@@ -5,2 +5,3 @@ const plugin = require("tailwindcss/plugin"); | ||
const borderRadius = require("./borderRadius"); | ||
const borderColor = require("./borderColor"); | ||
const borderWidth = require("./borderWidth"); | ||
@@ -14,3 +15,7 @@ const boxShadow = require("./boxShadow"); | ||
const maxWidth = require("./maxWidth"); | ||
const minWidth = require("./minWidth"); | ||
const maxHeight = require("./maxHeight"); | ||
const minHeight = require("./minHeight"); | ||
const scale = require("./scale"); | ||
const zIndex = require("./zIndex"); | ||
@@ -21,2 +26,60 @@ module.exports = plugin.withOptions( | ||
const { addUtilities, addVariant, theme, e, prefix, variants } = options; | ||
const escape = e || ((x) => x); | ||
const pseudoElements = [ | ||
"after", | ||
"backdrop ", | ||
"before", | ||
"cue", | ||
"first-letter", | ||
"first-line", | ||
"grammar-error ", | ||
"marker ", | ||
"placeholder ", | ||
"selection", | ||
]; | ||
pseudoElements.forEach((pseudo) => { | ||
addVariant(pseudo, ({ modifySelectors, separator }) => { | ||
modifySelectors(({ className }) => { | ||
return `.${escape(`${pseudo}${separator}${className}`)}::${pseudo}`; | ||
}); | ||
}); | ||
}); | ||
addVariant("important", ({ container }) => { | ||
container.walkRules((rule) => { | ||
rule.selector = `.\\!${rule.selector.slice(1)}`; | ||
rule.walkDecls((decl) => { | ||
decl.important = true; | ||
}); | ||
}); | ||
}); | ||
addUtilities( | ||
{ | ||
".empty-content": { | ||
content: "''", | ||
}, | ||
}, | ||
["before"] | ||
); | ||
addUtilities( | ||
{ | ||
".col-span-full": { | ||
"grid-column": "1 / -1", | ||
}, | ||
}, | ||
["responsive"] | ||
); | ||
addUtilities( | ||
{ | ||
".hide": { | ||
display: "none", | ||
}, | ||
".show": { | ||
display: "block", | ||
}, | ||
}, | ||
["responsive", "important"] | ||
); | ||
}; | ||
@@ -30,2 +93,3 @@ }, | ||
borderRadius, | ||
borderColor, | ||
borderWidth, | ||
@@ -39,3 +103,7 @@ boxShadow, | ||
maxWidth, | ||
minWidth, | ||
maxHeight, | ||
minHeight, | ||
scale, | ||
zIndex, | ||
}, | ||
@@ -42,0 +110,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69327
24
1303
1