checkcss
Utility method for warning any time the class
attribute of an element references an undefined CSS class.
This module provides two methods:
checkCSS()
performs a one-time sweep of the DOM.monitorCSS()
Sets up a
MutationObserver to continuously monitor DOM changes, looking for elements that reference undefined CSS classes.
(Note: monitorCSS()
is fairly efficient but is probably not something you want to be
running in production.)
Installation
npm i checkcss
Usage
import checkCSS, { ignoreCSS, monitorCSS } from 'checkcss';
ignoreCSS(/^license-|^maintainer-/);
checkCSS();
monitorCSS();