Skip to content

Tailwind v3/v0.10 -> Tailwind v4/v0.12 migration silently removes global form styles #1677

@corneliusroemer

Description

@corneliusroemer

We ran into a fairly subtle migration issue upgrading from:

  • Flowbite React v0.10.x + Tailwind v3
    to
  • Flowbite React v0.12.x + Tailwind v4

and wanted to document the findings and ask for guidance on the intended migration path.

What changed for us

After upgrading, a number of input fields across our application suddenly lost their styling (especially padding/spacing), including components that do not use Flowbite React at all.

Initially this was confusing because the affected components were unrelated to Flowbite.

After tracing through the generated CSS, we found that the old integration path implicitly injected global form styles, while the new Tailwind v4 integration no longer does.

Flowbite React 0.10 injects global styles

With Tailwind v3 we had:

const flowbite = require("flowbite-react/tailwind");

plugins: [
  flowbite.plugin(),
]

It seems that flowbite.plugin() internally routed through the standalone flowbite/plugin.

That plugin appears to have had forms = true enabled by default and injected global base styles via addBase(...), including selectors like:

[type='text'],
[type='email'],
textarea,
select {
  padding: .5rem .75rem;
  ...
}

Flowbite React v0.12 no longer creates global stzles

With Tailwind v4 / Flowbite React v0.12 the recommended setup is

@import "flowbite-react/plugin/tailwindcss";
@source "../../.flowbite-react/class-list.json";

This new CSS-first integration path no longer appears to route through the standalone flowbite/plugin, and the global form base styles disappear.

As a result:

  • unrelated inputs lose padding/styling
  • applications may experience visual regressions outside Flowbite components
  • the migration impact is difficult to trace back to Flowbite

Questions

  1. Is this an intended behavioral change? Is my analyis correct that flowbite v0.10 injected global styles?
  2. Is there an officially recommended migration path for users who implicitly depended on the old global form reset behavior?
  3. Would it make sense to mention this in the migration docs / compatibility docs?

This was particularly difficult to debug because the regressions appeared in components that did not use Flowbite at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions