Files
speckle-server/packages/tailwind-theme
Kristaps Fabians Geikins 83d8035dc2 chore: upgrade to eslint 9 (#2348)
* root + server

* frontend

* frontend-2

* dui3

* dui3

* tailwind theme

* ui-components

* preview service

* viewer

* viewer-sandbox

* fileimport-service

* webhook service

* objectloader

* shared

* ui-components-nuxt

* WIP full config

* WIP full linter

* eslint projectwide util

* minor fix

* removing redundant ci

* clean up test errors

* fixed prettier formatting

* CI improvements

* TSC lint fix

* 'buildBatch' needs to be async since some batch types (like Text) require it. Removed a disabled liniting rule from ObjLoader

* removed unnecessary void

---------

Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
2024-06-12 14:38:02 +03:00
..
2024-05-17 14:36:28 +02:00

tailwind-theme

Tailwind theme used in frontend 2 and other apps.

Setup

  1. Install the package
  2. In your tailwind config import @speckle/tailwind-theme and @tailwindcss/forms and add them to your plugins array
  3. Import tailwindContentEntry from @speckle/tailwind-theme/tailwind-configure and invoke it in the contents field in your Tailwind config to ensure PurgeCSS is configured correctly. It requires the CJS require object as its only parameter. If it isn't available (in an ESM environment), you can use node's createRequire().

Development

  1. Link this repo to wherever you're using this package. Unnecessary if you're using this package somewhere inside this monorepo.
  2. Run yarn build to re-build

Viewer

Run yarn viewer to open the Tailwind Config Viewer in the browser.

Note 1: The project must be built first for this to work! Note 2: All of the custom colors that rely on CSS variables will only show the light mode version irregardless of the "Dark Mode" toggle. This is because of a limitation of Tailwind Config Viewer.