Merge pull request #207 from JsSucks/normalizer

fix class search in normalizer
This commit is contained in:
Alexei Stukov 2018-08-09 23:29:28 +03:00 committed by GitHub
commit b33aff51c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ export default class ClassNormaliser extends Module {
shouldIgnore(value) {
if (!isNaN(value)) return true;
if (value.endsWith('px') || value.endsWith('ch') || value.endsWith('em') || value.endsWith('ms')) return true;
if (value.startsWith('rgba')) return true;
if (value.includes('calc(')) return true;
if (value.startsWith('#') && (value.length == 7 || value.length == 4)) return true;
if (value.includes('calc(') || value.includes('rgba')) return true;
return false;
}