Skip to content

tonyennis145/dumb-tailwind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use dumb-tailwind in one line

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tonyennis145/dumb-tailwind@69b2513/dist/tailwind.css" />

About

This repo is used to generate a fully compiled tailwind.css file that can be hosted directly from a CDN or s3 with no need to integrate Tailwind into your codebase with npm or use any kind of pre/post compilation step. It works well in cases where one initial moderately heavy load (733kb) won't have a noticeable impact on end user experience.

What's Included

  • The current list of classes included by default can be found here.
  • We started with classes we thought we'd need, then spent about 3 months adding classes that were missing from our original set. We've now been using this file for four reasonably large projects and haven't had any cases in the last few months where it's been missing a class we've needed. But in the case that there are classes missing, you can use the instructions below to generate your own.

How It Works

  • There is a single .txt file (/src/classes.txt) which contains a list of all of the classes we may need to use.
  • We use the tailwindcss npx command to parse this file and output a fully compiled css file that contains only these classes.

How to Use

  • To use our default file, simply download the raw file here, upload it to wherever you'd like to host it, and reference it normally in the head of your html file.
  • To customize the classes that are included, see the instructions below.

Customizing the defaults (adding or removing classes)

  • Pull this repo
  • Install npm & npx, then tailwind.
  • Make whatever changes you need to the /src/classes.txt
  • Run npx tailwindcss-cli -i ./src/input.css -o ./dist/tailwind.css to compile the file.
  • Your compiled file is now available in /dist/tailwind.css. Upload it to S3 or wherever you'd like to host it, and reference it normally in the head of your page.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published