Skip to content

Instantly share code, notes, and snippets.

@jack-pallot
Created August 7, 2018 17:36
Show Gist options
  • Save jack-pallot/217a5d172ffa43c8c85df2cb41b80bad to your computer and use it in GitHub Desktop.
Save jack-pallot/217a5d172ffa43c8c85df2cb41b80bad to your computer and use it in GitHub Desktop.
WP Purge CSS Whitelist
whitelist: [
'p',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'hr',
'ol',
'ol li',
'ul',
'ul li',
'em',
'b',
'strong',
'blockquote',
'mismatch',
'screen-reader-text',
'current',
'dots',
'menu-item',
'menu-item-type-post_type_archive',
'menu-item-object-locations',
'current-menu-item',
'current-menu-parent',
'menu-item-has-children'
],
whitelistPatterns: [
/^gfield(_.*)?$/,
/^gform(_.*)?$/,
/^gf_progressbar(_.*)?$/,
/^ginput_container$/,
/^validation(_.*)?$/,
/^ginput_container(_.*)?$/,
/^u-pl(-.*)?$/,
/^u-pr(-.*)?$/,
/^u-pt(-.*)?$/,
/^u-pb(-.*)?$/,
/^u-px(-.*)?$/,
/^u-py(-.*)?$/,
/^u-p(-.*)?$/,
/^u-ml(-.*)?$/,
/^u-mr(-.*)?$/,
/^u-mt(-.*)?$/,
/^u-mb(-.*)?$/,
/^u-mx(-.*)?$/,
/^u-my(-.*)?$/,
/^u-m(-.*)?$/
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment