pc__search_id_in_css

This is plugin for nmp-package "Post-Compression". He's searching for the value of "id" in the CSS code.

Usage no npm install needed!

<script type="module">
  import pcSearchIdInCss from 'https://cdn.skypack.dev/pc__search_id_in_css';
</script>

README

Search id in CSS

This is plugin for nmp-package "Post-Compression".
He's searching for the value of "id" in the CSS code.

An example of using:

var searchIdInCSS = require("pc__search_id_in_css"),
    uniqueNames = {};
 
gulp.src("./*.css")
    .pipe(postCompression.search([
        searchIdInCSS()
    ], uniqueNames));

Where:

  • uniqueNames - an object of type JSON with rules replace the long words to short words.

An example of CSS code:

#someIdA,
#someIdA #someIdB {
    ...
}

An example of a result searching:

{
    "someIdA": 2,
    "someIdB": 1
}