Nearest Phase Modulator

    postcss-remove-declaration

    1.0.0 • Public • Published

    PostCSS Remove Declaration

    PostCSS plugin to remove declarations by selector.

    💿 Installation

    Via NPM

    $ npm install postcss-remove-declaration --save-dev

    Via Yarn

    $ yarn add postcss-remove-declaration --dev

    🚀 Usage

    Once you have done the installation, you will need to configure plugin by creating a postcss.config.js file in the root of your project. As an example:

    module.exports = {
      plugins: [
        require("postcss-remove-declaration")({
          remove: {
            ".a": "*",
            ".b": "color",
            ".c": ["color", "background-color"],
            ".d": {
              color: "crimson",
              "background-color": "tomato"
            }
          }
        })
      ]
    };

    ⚙️ Properties

    Property Required Type Description
    remove true String, Array, Object An object where each specified key is a CSS selector and each value is either "*" indicating that all rules for that selector should be removed, a string matching the CSS property name to remove (e.g. color), an array of strings containing CSS properties to be removed (e.g. ["color", "background-color"]), or an object where each entry specifies declaration in which key is a CSS property and value is a CSS value (e.g { color: "cyan" }).

    Powered by

    • PostCSS

    🔒 License

    MIT

    Install

    npm i postcss-remove-declaration

    DownloadsWeekly Downloads

    78

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    5.24 kB

    Total Files

    4

    Last publish

    Collaborators

    • 3vil_arthas