Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.