Optional node-free Tailwind CSS for custom client JS modules

Open
#1,682 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript, react, tailwindcss, typescript

Research direction

Trace the existing esbuild binary resolution and compiled CSS auto-loading used for src/main/web and web/.compiled. Then determine where a build option can invoke the Tailwind standalone binary and produce one deterministic stylesheet with Preflight disabled. Done means the opt-in build works without Node and the generated utilities load with compiled bundles.

Written by the indexing model from the issue text.

Description

Description

Add an opt-in Tailwind CSS option for custom client JS (src/main/web) views, generated at build time without Node — by resolving the Tailwind standalone binary the same way the build already resolves the esbuild binary (an os-matched, checksummed native executable; not the npm/Node toolchain).

Proposed shape:

  • A build option (off by default, e.g. tailwind=true) runs the Tailwind standalone binary over src/main/web, scanning class usage, and emits one app-wide utilities stylesheet to web/.compiled/. It is then auto-loaded with the compiled bundles (the same mechanism that auto-loads compiled CSS).
  • Prefer Tailwind v4 (CSS-first config): the input is a small CSS file (@import "tailwindcss" + @source "./**/*.{js,jsx,ts,tsx}"), so there is no tailwind.config.js — a better fit for the no-Node, Maven-resolved model.
  • Scoping (important): ship utilities only, with Preflight (the global CSS reset) disabled by default — Preflight would restyle the platform's own UI. Offer an optional utility class prefix for extra collision safety.
  • Limits: only static class strings are detected (dynamically built names like `bg-${x}` are not); the generated stylesheet's load order must be deterministic.

Keeps the platform's "native esbuild binary, no Node at build" promise.

Reason

Tailwind is the dominant utility-first styling approach in modern React and the main remaining styling gap for custom React views. It matters most for two cases: teams standardized on Tailwind, and Tailwind-based component libraries (shadcn/ui-style). It is also relevant for AI-generated UIs — LLMs are highly fluent in Tailwind. Static fixed-CSS frameworks (e.g. Bootstrap) already work today by loading their stylesheet via onWebClientInit; only build-time-generated frameworks (Tailwind/UnoCSS) are missing. Estimated effort is small-to-medium (a standalone-binary resolver + one build invocation + the no-preflight scoping policy + docs).

Dominant language
Java
Stars
214
Forks
46
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lsfusion/platform

All issues in lsfusion/platform

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.