"oldPropertyPrefixes": [
"[id=landing] .logo { -moz-transition: transform 150ms ease-in
➥ 10ms, opacity 150ms ease-in } // was required by firefox 15 and
➥ earlier @ 182:5",
"[id=landing] .logo { -o-transition: transform 150ms ease-in
➥ 10ms, opacity 150ms ease-in } // was required by opera 12 and
➥ earlier @ 184:5",
],
"qualifiedSelectors": [
"span.error @ 147:1"
],
"multiClassesSelectors": [
".dance.logo @ 186:5"
], ...
}
}
offenderslistspotentialproblemswithyourCSS.Forexample,thequalifiedSe-
lectorspropertylistseveryclassselectorthat’soverlyqualifiedbyanelement.
Hereit’sspan.erroronline147,character 1 ofourCSSfile.ThemultiClassesSe-
lectorspropertylistsinstancesofselectorsthatcombinetwoormoreclassnames;
inthiscase.dance.logoonline186.Inbothcases,we’resendingoverlyspecific
CSSthatusesmorebytesthanweneed.
Afullstylesheetanalysismightincludetheincidencesof!important(theimport-
antsproperty),alistofcolordeclarations,InternetExplorerhacks(oldIEFixes),
andduplicatedpropertiesorselectors.
UnCSS
UnCSSparsesyourHTMLandCSSfiles,removingunusedCSS.Ifyourprojects
includeaCSSframeworksuchasBootstraporusearesetstylesheet,consideradding
UnCSStoyourworkflow.ItwillshaveunnecessaryCSS—andbytes—fromyour
code.
Installation
AswithotherNPMpackages,youcaninstallUnCSSusingthefollowingcommand:
Debugging and Optimization 125