Created
January 6, 2021 15:22
-
-
Save Akryum/562deb1d9e01293a31daa25814ef12a4 to your computer and use it in GitHub Desktop.
Tailwind negate responsive breakpoints
This file contains hidden or 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
const defaultTheme = require('tailwindcss/defaultTheme') | |
module.exports = { | |
theme: { | |
extend: { | |
screens: Object.keys(defaultTheme.screens).reduce((obj, key) => { | |
const [rawMin] = defaultTheme.screens[key].split('px') | |
const max = parseInt(rawMin) - 1 | |
obj[`!${key}`] = { max: `${max}px` } | |
return obj | |
}, {}), | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks 👍