purifycss-extended icon indicating copy to clipboard operation
purifycss-extended copied to clipboard

Doesn't distinguish between classes and ids

Open pmk65 opened this issue 7 years ago • 1 comments

Doesn't distinguish between classes and ids. Example:

const purifycss = require("purifycss-extended")

let content = '<div class="myselector"></div>'
let css = '.myselector {color:black;} #myselector {color:red;} .nomatch {color:blue;}'
let options = {}
console.log(purifycss(content, css, options))

Only one selector (class = myselector) is valid/used. But the result I get is:

.myselector {     
  color: black;   
}                 
                  
#myselector {     
  color: red;     
}

pmk65 avatar Dec 15 '17 13:12 pmk65

PurifyCSS doesn't make the difference :/ See closed issue here: https://github.com/HapLifeMan/purifycss-extended/issues/5#issuecomment-346776368.

HapLifeMan avatar Dec 15 '17 16:12 HapLifeMan