adnantopal/extractcss

Duplicating the CSS classes

Opened this issue · 2 comments

Each time I click the extract button, it is appending duplicate of the already created CSS. Can this be fixed?

I rewrote the code like this and its working fine now:

function outputCSS( extractStyle ) {
outputStr = "";
outputArr.forEach( function( elem ) {
outputStr += elem.selector + '{' + (elem.style && extractStyle ? elem.style : '') + '}';
} );
return outputStr;
}

@kishorekrishnan Why don't you submit a pull request?