Skip to content

Commit

Permalink
Update for tailwind v3
Browse files Browse the repository at this point in the history
  • Loading branch information
damsfx committed Dec 11, 2021
1 parent 057021e commit 9ca242f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Tailwind CSS Breakpoints Inspector
A Tailwind CSS plugin that shows the currently 'active' responsive breakpoint.

<img src="https://github.com/Hounddd/tailwindcss-breakpoints-inscpector/blob/962344e219947fdd65d972683effbb3f3d723e89/screenshot.gif" width="100%">
<img src="https://github.com/Hounddd/tailwindcss-breakpoints-inscpector/raw/master/screenshot.gif" width="100%">

## Install

Expand Down
32 changes: 0 additions & 32 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
/*
export default function({addBase, theme}) {
if (process.env.NODE_ENV === "production") return
const screens = theme('screens', {})
const breakpoints = Object.keys(screens)
addBase({
'body::after': {
content: `"Current breakpoint default (< ${screens[breakpoints[0]]})"`,
position: 'fixed',
right: '.5rem', // could replace with theme('spacing.2', '.5rem'), same for most of the other values
bottom: '.5rem',
padding: '.5rem .5rem .5rem 2rem',
background: 'no-repeat .5rem center / 1.25rem url(https://tailwindcss.com/favicon-32x32.png), #edf2f7',
border: '1px solid #cbd5e0',
color: '#d53f8c',
fontSize: '.875rem',
fontWeight: '600',
zIndex: '99999',
},
...breakpoints.reduce((acc, current) => {
acc[`@media (min-width: ${screens[current]})`] = {
'body::after': {
content: `"Current breakpoint ${current}"`
}
}
return acc
}, {})
})
}
*/

module.exports = function ({
addComponents,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "tailwindcss-breakpoints-inscpector",
"version": "1.0.0",
"version": "1.1.0",
"description": "A Tailwind CSS component that shows the currently active breakpoint.",
"main": "index.js",
"author": "Damien MATHIEU",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/hounddd/tailwindcss-breakpoint-inscpector.git"
"url": "https://github.com/Hounddd/tailwindcss-breakpoint-inscpector.git"
},
"homepage": "https://github.com/hounddd/tailwindcss-breakpoint-inscpector",
"bugs": "https://github.com/hounddd/tailwindcss-breakpoint-inscpector/issues",
"homepage": "https://github.com/Hounddd/tailwindcss-breakpoint-inscpector",
"bugs": "https://github.com/Hounddd/tailwindcss-breakpoint-inscpector/issues",
"peerDependencies": {
"tailwindcss": "^1.0 || ^2.0"
"tailwindcss": "^1.0 || ^2.0 || ^3.0"
}
}

0 comments on commit 9ca242f

Please sign in to comment.