Skip to content

Instantly share code, notes, and snippets.

@brettsmason
Last active August 4, 2019 07:04
Show Gist options
  • Save brettsmason/1fd495ff565e1892da0d43afbf1989af to your computer and use it in GitHub Desktop.
Save brettsmason/1fd495ff565e1892da0d43afbf1989af to your computer and use it in GitHub Desktop.
Mythic PurgeCSS whitelist
whitelist: [
'ltr',
'rtl',
'home',
'blog',
'archive',
'date',
'error-404',
'logged-in',
'admin-bar',
'no-customize-support',
'customize-support',
'custom-background',
'wp-custom-logo',
'alignnone',
'alignright',
'alignleft',
'wp-caption',
'wp-caption-text',
'screen-reader-text',
'comment-list',
// Custom
'logged-out',
'single',
'plural',
'alignwide',
'alignfull',
],
whitelistPatterns: [
/^(.*)?-?single(-.*)?$/,
/^(.*)-template(-.*)?$/,
/^(post-type-)?archive(-.*)?$/,
/^taxonomy(-.*)?$/,
/^attachment(-.*)?$/,
/^(.*)?-?paged(-.*)?$/,
/^search(-.*)?$/, // needed?
/^postid-(.*)?$/, // not in Mythic
/^attachmentid-(.*)?$/, //needed?
/^page(-.*)?$/,// needed?
/^author(-.*)?$/,// needed?
/^tag(-.*)?$/, // needed?
/^tax-(.*)?$/, // needed?
/^term-(.*)?$/, // needed?
// Should we include app-* classes here?
/^(.*)?-?app(-.*)?$/,
/^(.*)?-?menu(-.*)?$/
/^(.*)?-?widget(-.*)?$/
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment