From b1f15a2a1fa4e764ef8c96a4383ba9c9f2dcb1d3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 24 Aug 2023 19:49:32 +0100 Subject: [PATCH] feat: initial commit --- .gitignore | 3 +++ README.md | 1 + package.json | 11 +++++++++++ src/index.js | 5 +++++ 4 files changed, 20 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 package.json create mode 100644 src/index.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9220c11 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/dist/ +/node_modules/ +/package-lock.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..f4294d6 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# tailwindcss-plugin-hocus-state diff --git a/package.json b/package.json new file mode 100644 index 0000000..5b0b978 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "tailwindcss-plugin-hocus-state", + "version": "0.1.0", + "description": "Adds a hocus state for Tailwind CSS for easily adding styles for hover and focus states.", + "main": "src/index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Oliver Davies", + "license": "MIT" +} diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..744a329 --- /dev/null +++ b/src/index.js @@ -0,0 +1,5 @@ +const plugin = require("tailwindcss/plugin"); + +module.exports = plugin(({ addVariant }) => { + addVariant("hocus", ["&:hover", "&:focus"]); +});