Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrmcc3/tailwind-cljs-example
Example Setup - Tailwind + ClojureScript
https://github.com/mrmcc3/tailwind-cljs-example
clojurescript purgecss tailwind
Last synced: 11 days ago
JSON representation
Example Setup - Tailwind + ClojureScript
- Host: GitHub
- URL: https://github.com/mrmcc3/tailwind-cljs-example
- Owner: mrmcc3
- Created: 2020-03-31T00:49:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T11:38:10.000Z (almost 3 years ago)
- Last Synced: 2024-12-13T21:11:42.911Z (14 days ago)
- Topics: clojurescript, purgecss, tailwind
- Language: Clojure
- Homepage:
- Size: 244 KB
- Stars: 16
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Example Setup - Tailwind + ClojureScript
Some example setups for using TailwindCSS with ClojureScript.
Both examples (figwheel-main, shadow-cljs) rely on the official tailwind nodejs
tooling to process the CSS. All the official docs regarding [configuration
](https://tailwindcss.com/docs/configuration)
apply here.The examples follow the tailwind [recommendation](https://tailwindcss.com/docs/controlling-file-size#removing-unused-css)
for controlling css file size in production builds using PurgeCSS. One thing to
be aware of is that by default PurgeCSS works by running a regex over all
your source files to find anything that might be a CSS selector.Out of the box it works on class names in cljs files that are strings or
symbols. It **does not work** on keyword class names.Due to the way PurgeCSS works it can only eliminate classes it can see via its
regex. This means the tailwind classes need to be literal strings/symbols
(not generated). See [writing purgeable html](https://tailwindcss.com/docs/controlling-file-size#writing-purgeable-html)