An open API service indexing awesome lists of open source software.

https://github.com/kevinhellos/twscope

Library to prevent class bloating for Tailwind CSS
https://github.com/kevinhellos/twscope

Last synced: 2 months ago
JSON representation

Library to prevent class bloating for Tailwind CSS

Awesome Lists containing this project

README

          

# twscope
Library to prevent class bloating for Tailwind CSS

## Setup
1. Add the twscope.js to the root directory of your project
2. Add the script.js to the root directory of your project

## [scope] tag
```html

Submit

// Import createScope
import createScope from "./twscope.js";

// Create and init the scope
var scope = createScope();

// Save classes name and assign it to the bind variable
scope.save("submitButton", "mt-5 ml-5 text-white bg-blue-700 hover:bg-blue-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-md text-sm px-5 py-2.5 me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800");

// Compile the scope
scope.compile();

```