Socket
Socket
Sign inDemoInstall

@salesforce-ux/postcss-annotations-parser

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @salesforce-ux/postcss-annotations-parser

PostCSS plugin to parse annotation comments such as `@css-var-fallback`.


Version published
Weekly downloads
13
decreased by-23.53%
Maintainers
1
Install size
1.45 MB
Created
Weekly downloads
 

Readme

Source

PostCSS Annotations Parser

NOTICE: This plugin is provided as-is without support, implied or otherwise.

PostCSS plugin to parse annotation comments such as @css-var-fallback

.foo {
    /* Input example */

    /*! @css-var-fallback border-radius */
    --sds-c-avatar-radius-border: var(--sds-g-radius-border, 12%);
}
.foo {
  /* Output example */

  border-radius: var(--sds-g-radius-border, 12%);
  --sds-c-avatar-radius-border: var(--sds-g-radius-border, 12%);
}

Usage

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:

module.exports = {
  plugins: [
+   require('postcss-annotations-parser'),
    require('autoprefixer')
  ]
}

If you do not use PostCSS, add it according to official docs and set this plugin in settings.

Options

  • preserve: if set to false the plugin will not preserve the existing declaration and overwrite instead

Keywords

FAQs

Last updated on 13 Nov 2020

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.

Install

Related posts

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