Created
September 4, 2019 19:32
-
-
Save tomhodgins/04de51518310d558cafe89ae374a699d to your computer and use it in GitHub Desktop.
Paste this into your browser's console to list all unique media query breakpoints used in CSSOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Unique Media Queries | |
import('https://unpkg.com/cssomtools').then(({process, query})=> { | |
let found = new Set | |
process( | |
query(), | |
rule => rule.media && found.add( | |
rule.media.mediaText | |
.replace(/(only\s+)*screen\s+(and\s+)*/, '') | |
.trim() | |
) | |
) | |
console.log(found) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment