Have ideas to improve npm?Join in the discussion! »

    postcss-expand-selectors

    0.0.2 • Public • Published

    PostCSS Expand Selectors

    [PostCSS] plugin to expand comma separated selectors into individual rules.

    SCSS source

    a {
      e: f;
    }
     
    b,
    {
      g: h;
    }
     
    {
      i: j;
    }

    Compile the SCSS files with these options: { sourceComments: true, outputStyle: 'expanded' }

    CSS before

    a {
      e: f;
    }
     
    /* line 4, style.css */
    b,
    {
      g: h;
    }
     
    {
      i: j;
    }

    Usage

    postcss([ require('postcss-expand-selectors') ])

    CSS after

    a {
      e: f;
    }
     
    /* line 4, style.css */
    b {
      g: h;
    }
     
    /* line 4, style.css */
    {
      g: h;
    }
     
    {
      i: j;
    }

    When to use this plugin

    If there are no somma separated selectors in a rule then you can get a more accurate CSS coverage report from Google Chrome with Puppeteer.

    So use this plugin only when you prepare your application for CSS coverage generatation with Google Chrome, but do not use this plugin when you create production release.

    Install

    npm i postcss-expand-selectors

    DownloadsWeekly Downloads

    2

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    3.54 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar