Skip to content

Modal maxWidth ignored using Tailwind 4.1.11 (and 4.0.7) #170

@elricho

Description

@elricho

Environment Details

  • PHP Version: 8.5.0
  • Laravel Version: 12.39.0
  • React or Vue Version: 3.5.22
  • Inertia.js Version: 2.2.9
  • Inertia Modal Version: 1.0.0-beta-4
  • Tailwind Version: 4.1.11

Bug Report

Description

Using the package with Tailwind 3.4.17 works great. maxWidth is honoured. After upgrading to Tailwind 4.1.11 (latest 4.1 release), maxWidth is ignored.

Steps To Reproduce

Test case

<Modal v-slot="{ close }" maxWidth="4xl" #refault="{ reload }">
        <div class="p-2">
            <h1 class="text-2xl font-bold mb-4">Bingo Test Modal</h1>
            <p class="text-zinc-700 dark:text-zinc-300 mb-6">
                This is a minimal test case for testing Inertia modals.This is a minimal test case for testing
                 Inertia modals.This is a minimal test case for testing Inertia modals.This is a minimal test c
                 ase for testing Inertia modals.This is a minimal test case for testing Inertia modals.This is a m
                 inimal test case for testing Inertia modals.This is a minimal test case for testing Inertia modals.Th
                 is is a minimal test case for testing Inertia modals.This is a minimal test case for testing Inertia
                 modals.This is a minimal test case for testing Inertia modals.This is a minimal test case for testing
                  Inertia modals.This is a minimal test case for testing Inertia modals.This is a minimal test case for
                  testing Inertia modals.This is a minimal test case for testing Inertia modals.This is a minimal tes
                t case for testing Inertia modals.This is a minimal test case for testing Inertia modals.
            </p>
            <button
                @click="close"
                class="px-4 py-2 bg-cyan-500 text-white rounded-lg hover:bg-cyan-600"
            >
                Close
            </button>
        </div>
    </Modal>

Expected Behaviour

maxWidth should be honoured.

Actual Behavior

maxWidth setting is ignored using Tailwind 4.1.11.

Tailwind 3.4.17

Image

Tailwind 4.1.11

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions