Wondering what’s next for npm?Check out our public roadmap! »

    postcss-inherit-parser

    0.2.0 • Public • Published

    PostCSS Inherit Parser

    Build Status Code Climate Test Coverage Issue Count Dependency Status Inline docs npm version


    A PostCSS Parser that supports syntax for inherit declarations with pseudo classes.

    .b:before {
      content: "";
    }
    .a {
      inherit: .b:before;
    }

    Defining inherit syntax

    Using an options object with a property of propertyRegExp, you can define a custom inherit syntax.

    This example:

     
     
    parse(
      '.a { color: red; } .b { extend: .a; }',
      { propertyRegExp: /^extends?$/ }
    );

    would work with this css:

    .a {
      color: red;
    }
    .b {
      extend: .a;
    }

    Install

    npm i postcss-inherit-parser

    DownloadsWeekly Downloads

    2,007

    Version

    0.2.0

    License

    Apache-2.0

    Unpacked Size

    23.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar