Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
postcss-duplicate-property
Advanced tools
PostCSS plugin that duplicates custom properties to provide a fallback for older browsers
PostCSS plugin that duplicates custom properties to provide a fallback for older browsers.
const duplicateProps = require('postcss-duplicate-property')
module.exports = {
plugins: [
duplicateProps({
values: ['$text-color'],
duplicate: value => `$custom-property-${value.slice(1)}`
})
]
}
.foo {
color: $text-color;
}
.foo {
color: $text-color;
color: $custom-property-text-color;
}
Check you project for existed PostCSS config: postcss.config.js
in the project root, "postcss"
section in package.json
or postcss
in bundle config.
If you already use PostCSS, add the plugin to plugins list:
const duplicateProps = require('postcss-duplicate-property');
module.exports = {
plugins: [
+ duplicateProps({values: [ /* values to duplicate */ ], duplicate: value => /* duplicated value */}),
require('autoprefixer')
]
}
If you do not use PostCSS, add it according to official docs and set this plugin in settings.
FAQs
PostCSS plugin that duplicates custom properties to provide a fallback for older browsers
The npm package postcss-duplicate-property receives a total of 1 weekly downloads. As such, postcss-duplicate-property popularity was classified as not popular.
We found that postcss-duplicate-property demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.