Skip to content

Tailwind CSS support #7454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
14 tasks
rolfsmeds opened this issue Mar 20, 2025 · 0 comments
Open
14 tasks

Tailwind CSS support #7454

rolfsmeds opened this issue Mar 20, 2025 · 0 comments
Assignees
Labels
DS Design System feature (e.g. component) PRD v25

Comments

@rolfsmeds
Copy link
Collaborator

rolfsmeds commented Mar 20, 2025

Description

Full or partial support for the Tailwind CSS framework in V25, with Aura (and possibly Lumo) style token integration.

Tier

Free

License

Apache 2.0

Motivation

Background

The Tailwind CSS framework has become almost a de-facto standard for CSS utility classes in recent years, to the extent that web developers, especially those with React experience, expect to be able to use it.

The Lumo Utility Classes introduced in 2021 provide similar utility classes, but constitute only a fraction of the utilities available in Tailwind.

Problem

While it has been possible to use it in Vaadin applications before, integration has been non-trivial.
Furthermore, the new Aura theme in V25 means that the Lumo Utility package would need to either be duplicated for it, or refactored to be theme-agnostic to work with both Lumo and Aura, and the available utilities would still correspond to only a fraction of the utilities developers are used to with Tailwind.

Solution

The end goal is to provide full support for Tailwind CSS, with

  • Just-in-time generation of the classes used in the project
  • Integration of Tailwind core style tokens (such as colors, typography and sizing/spacing) with those in Lumo and Aura
  • A typesafe Flow API
  • Included by default in Aura theme
  • Provided as an opt-in alternative to Lumo Utility Classes for use with the Lumo theme

In case this is not achievable by 25.0, an interim solution will be provided instead:

  • A precompiled, static subset of Tailwind CSS, corresponding in scope to the Lumo Utility Classes
  • No dedicated Flow API (but usable via the usual CSS classname APIs)
  • Style token integration only for Aura theme

Requirements

  • Tailwind CSS (at least a precompiled subset corresponding to Lumo Utility) available out of the box in V25 projects
  • Integration of core style tokens with those of Aura
  • Included by default in Aura theme
  • Documentation

Nice-to-haves

  • Full Tailwind CSS support with JIT generation based on classes used in Hilla and Flow
  • Typesafe Flow API
  • Opt-in for Lumo theme
  • Integration of core style tokens with those of Lumo

Risks, limitations and breaking changes

Risks

  • Flow support for Tailwind's JIT generation might be tricky (a custom build step may be required)
  • Design and implementation of a Flow API for Tailwind's dynamic classes (e.g. size-123px) is non-trivial
  • Considering the extent of Tailwind CSS, the Flow API may need to be somehow automated

Limitations

  • Uncertain if full Tailwind support (requiring generation of CSS based on classes used in the project) can be provided for Flow's precompiled frontend bundle
  • Styling Vaadin components (other than layouts and the native HTML element classes in Flow) with Tailwind will not be possible, since Tailwind CSS classes can only be applied to their root elements, and most component styling requires targeting their child elements, shadow parts and states.

Breaking changes

None expected.

Out of scope

Materials

Metrics

TBD

Pre-implementation checklist

  • Estimated (estimate entered into Estimate custom field)
  • Product Manager sign-off
  • Engineering Manager sign-off

Pre-release checklist

  • Documented (link to documentation provided in sub-issue or comment)
  • UX/DX tests conducted and blockers addressed
  • Approved for release by Product Manager

Security review

None

@rolfsmeds rolfsmeds added DS Design System feature (e.g. component) PRD v25 labels Mar 20, 2025
@github-project-automation github-project-automation bot moved this to Under consideration in Roadmap Mar 20, 2025
@rolfsmeds rolfsmeds moved this from Under consideration to December 2025 (25.0) in Roadmap Mar 20, 2025
@rolfsmeds rolfsmeds self-assigned this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DS Design System feature (e.g. component) PRD v25
Projects
Status: December 2025 (25.0)
Development

No branches or pull requests

1 participant