Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhodgins/04de51518310d558cafe89ae374a699d to your computer and use it in GitHub Desktop.
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
// 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