Library of additional classes to complement the existing ones from Tailwind
npm install tailwind-additional-classesbash
npm install tailwind-additional-classes
`
- Add the plugins configuration for Tailwind:
`js
// tailwind.config.js
const styles = require("tailwind-additional-classes");
module.exports = {
future: {},
purge: [],
theme: {
extend: {},
},
variants: {},
plugins: [styles.pluginFunction],
};
`
The styles.pluginFunction will add the library styles as utilities to the rest of the Tailwind utilities.
You can find more information about writing tailwind plugins here.
- Apply Styles
You can apply the styles just like you would with a Tailwind class, all classes from the library are prefixed with ac-.
Example inside the library:
`js
".mb-1" {
marginBottom: '0.25rem';
},
`
Using the classes above in your project:
`html
`
Development
- Must be framework agnostic
- No dependencies
Test
To test if all the classes are properly included, run
`
npm i
npm run build
npm run test
``