Media Queries Based on Element Width with MutationObserver

A quick way to watch for element width changes using window resize event and MutationObserver. Add different attributes to the element depending on its width and style accordingly.