Skip to content
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

Input label and badge spacing missing after upgrade #1118

Open
3 tasks done
jlarm opened this issue Feb 19, 2025 · 87 comments
Open
3 tasks done

Input label and badge spacing missing after upgrade #1118

jlarm opened this issue Feb 19, 2025 · 87 comments

Comments

@jlarm
Copy link

jlarm commented Feb 19, 2025

Flux version

v2.0

Livewire version

v3.4

Tailwind version

v4.0.7

What is the problem?

When displaying a "Required" badge in the label for a field there is no spacing between the label and input field after the upgrade to v2.

Image

Code snippets

<flux:field>
    <flux:label badge="Required">Email</flux:label>

    <flux:input type="email" required />

    <flux:error name="email" />
</flux:field>
<flux:input wire:model="form.name" label="Name" badge="required" />

How do you expect it to work?

There should be a gap between the label and the input field.

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I have provided code samples as text and NOT images.
  • I understand my bug report will be closed if I haven't met the criteria above.
@jeffchown
Copy link

@jlarm Your code works for me. Have you run php artisan view:clear after upgrading?

Image

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

Yep, no custom css styles are being used either. Just flux and tailwind defaults. This is a brand new app that was just started a couple of days ago.

@jeffchown
Copy link

@jlarm Tough to help when I can't recreate it - If you can find out which CSS is causing it via your browser's dev tools, that might help.

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

From what it looks like, margin-bottom is not getting added to the label. The left side of the screenshot is the flux site, the right side is my local dev.

Image

@jeffchown
Copy link

jeffchown commented Feb 19, 2025

@jeffchown And I can confirm my CSS includes the margin-bottom the same as the left of your image. I suspect it's related to TW4.

Can you share your app.css and tailwind.config.js?

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

After running the tailwind upgrade everything is in the app.css file which was updated to look like this:

@import 'tailwindcss';
@import '../../vendor/livewire/flux/dist/flux.css';

@plugin '@tailwindcss/forms';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../vendor/livewire/flux-pro/stubs/**/*.blade.php';
@source '../../vendor/livewire/flux/stubs/**/*.blade.php';
@source "../views";

@custom-variant dark (&:where(.dark, .dark *));

@layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        border-color: var(--color-gray-200, currentColor);
    }
}

@theme {
  --font-sans:
    Inter, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

/* Re-assign Flux's gray of choice... */
@theme {
    --color-zinc-50: var(--color-gray-50);
    --color-zinc-100: var(--color-gray-100);
    --color-zinc-200: var(--color-gray-200);
    --color-zinc-300: var(--color-gray-300);
    --color-zinc-400: var(--color-gray-400);
    --color-zinc-500: var(--color-gray-500);
    --color-zinc-600: var(--color-gray-600);
    --color-zinc-700: var(--color-gray-700);
    --color-zinc-800: var(--color-gray-800);
    --color-zinc-900: var(--color-gray-900);
    --color-zinc-950: var(--color-gray-950);
}

@theme {
    --color-accent: var(--color-sky-600);
    --color-accent-content: var(--color-sky-600);
    --color-accent-foreground: var(--color-white);
}

@layer theme {
    .dark {
        --color-accent: var(--color-sky-600);
        --color-accent-content: var(--color-sky-400);
        --color-accent-foreground: var(--color-white);
    }
}

@jeffchown
Copy link

@jlarm Do you have a tailwind.config.js file as well?

I think you should be able to remove these 2 lines from your app.css:

@source '../../vendor/livewire/flux-pro/stubs/**/*.blade.php';
@source '../../vendor/livewire/flux/stubs/**/*.blade.php';

then npm run build and php artisan view:clear and clear your browser's cache before trying again.

Also, did you publish any Flux views? If so, please delete them and try again.

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

I don't have a tailwind.config.js file anymore. I did those steps and tried it in incognito and a different browser but still don't see the margin-bottom on the labels.

@jeffchown
Copy link

@jlarm And you haven't previously published any of the Flux components?

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

Sorry, forgot to mention that. I have not published any of the components.

@jeffchown
Copy link

I'll have to give this one a think...

@jeffchown
Copy link

What about your layout file? Can you post your layout and the view's blade file?

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

Sure, no problem. It is a mess right now 😵‍💫.

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <meta name="csrf-token" content="{{ csrf_token() }}" />

        <title>{{ $title ?? config('app.name') }}</title>

        <link rel="shortcut icon" type="image/x-icon" href="{{ asset('favicon.svg') }}" />

        <!-- Fonts -->
        <link rel="preconnect" href="https://fonts.bunny.net" />
        <link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />

        <!-- Scripts -->
        @vite(['resources/css/app.css', 'resources/js/app.js'])
        @fluxAppearance
    </head>
    <body class="min-h-screen bg-white dark:bg-zinc-800">
        <flux:header container class="border-b border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900">
            <flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />

            <x-application-logo class="mr-4 h-8 w-auto" />

            <x-navigation />

            <flux:spacer />

            <livewire:components.date-time />

            <flux:dropdown position="top" align="start">
                <flux:button variant="ghost" icon-trailing="chevron-down">{{ auth()->user()->name }}</flux:button>
                <flux:menu class="space-y-2">
                    <flux:menu.item wire:navigate href="{{ route('profile') }}" icon="user">Profile</flux:menu.item>

                    <flux:radio.group x-data variant="segmented" x-model="$flux.appearance">
                        <flux:radio value="light" icon="sun" />
                        <flux:radio value="dark" icon="moon" />
                        <flux:radio value="system" icon="computer-desktop" />
                    </flux:radio.group>

                    <flux:menu.item icon="arrow-right-start-on-rectangle">Logout</flux:menu.item>
                </flux:menu>
            </flux:dropdown>
        </flux:header>

        <flux:sidebar
            stashable
            sticky
            class="border-r border-zinc-200 bg-zinc-50 lg:hidden dark:border-zinc-700 dark:bg-zinc-900"
        >
            <flux:sidebar.toggle class="lg:hidden" icon="x-mark" />

            <x-navigation-mobile />

            <flux:spacer />

            <flux:navlist variant="outline">
                <flux:navlist.item icon="cog-6-tooth" href="#">Settings</flux:navlist.item>
                <flux:navlist.item icon="information-circle" href="#">Help</flux:navlist.item>
            </flux:navlist>
        </flux:sidebar>

        <flux:main container>
            <div>
                <div class="flex items-end justify-between">
                    @if (isset($pageTitle))
                        <flux:heading size="lg">{{ $pageTitle }}</flux:heading>
                    @endif

                    @if (isset($actions))
                        {{ $actions }}
                    @endif
                </div>
                @if (isset($pageTitle))
                    <flux:separator class="my-5" variant="subtle" />
                @endif
            </div>

            {{ $slot }}
        </flux:main>
        @persist('toast')
            <flux:toast />
        @endpersist

        @fluxScripts
    </body>
</html>

@jeffchown
Copy link

@jlarm And the view file?

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

🤦‍♂️ Sorry again. There are a couple components I added from the docs that are in here just to test. Here is the view:

<div>
    <x-slot name="pageTitle">Create Dealership</x-slot>
    <form wire:submit.prevent="save">
        <div class="grid grid-cols-12 gap-5">
            <div class="col-span-8">
                <flux:card>
                    <div class="space-y-5">
                        <flux:field>
                            <flux:label badge="Required">Email</flux:label>

                            <flux:input type="email" required />

                            <flux:error name="email" />
                        </flux:field>
                        <flux:input wire:model="form.name" label="Name" badge="required" />
                        <flux:input wire:model="form.address" label="Address" />
                        <div class="grid grid-cols-3 gap-5">
                            <flux:input wire:model="form.city" label="City" />
                            <flux:select wire:model="form.state" label="State">
                                <flux:select.option></flux:select.option>
                                @foreach (App\Enum\State::cases() as $state)
                                    <flux:select.option :value="$state->value">{{ $state->label() }}</flux:select.option>
                                @endforeach
                            </flux:select>
                            <flux:input wire:model="form.zipCode" label="Zip Code" />
                        </div>
                        <div class="grid grid-cols-2 gap-5">
                            <flux:input
                                mask="999-999-9999"
                                placeholder="999-999-9999"
                                wire:model="form.phone"
                                label="Phone Number"
                            />
                            <flux:select wire:model="form.type" label="Type" badge="Required">
                                <flux:select.option></flux:select.option>
                                @foreach (App\Enum\Type::cases() as $type)
                                    <flux:select.option :value="$type->value">{{ $type->label() }}</flux:select.option>
                                @endforeach
                            </flux:select>
                            <flux:input wire:model="form.currentSolutionName" label="Current Solution Name" />
                            <flux:input wire:model="form.currentSolutionUse" label="Current Solution Use" />
                        </div>
                        {{-- <flux:textarea label="Notes" rows="auto" wire:model="form.notes" placeholder="Notes..." /> --}}
                        <flux:editor wire:model="form.notes" label="Notes" />
                    </div>
                </flux:card>
            </div>
            <div class="col-span-4">
                <flux:card>
                    <div class="space-y-5">
                        <flux:fieldset>
                            <flux:legend>Status</flux:legend>
                            <flux:switch
                                wire:model="form.dev"
                                label="In Development"
                                description="Turn on In Development when actively working on this dealership with the Sales Dev Rep."
                            />
                        </flux:fieldset>
                        <flux:separator class="my-5" variant="subtle" />
                        <flux:select
                            variant="listbox"
                            multiple
                            label="Consultants"
                            badge="required"
                            wire:model="form.selectedUsers"
                        >
                            @foreach ($this->users() as $user)
                                <flux:select.option :value="$user->id">{{ $user->name }}</flux:select.option>
                            @endforeach
                        </flux:select>
                        <flux:select label="Status" badge="required" wire:model="form.status">
                            <flux:select.option></flux:select.option>
                            @foreach (App\Enum\Status::cases() as $status)
                                <flux:select.option :value="$status->value">{{ $status->label() }}</flux:select.option>
                            @endforeach
                        </flux:select>
                        <flux:select label="Rating" badge="required" wire:model="form.rating">
                            <flux:select.option></flux:select.option>
                            @foreach (App\Enum\Rating::cases() as $rating)
                                <flux:select.option :value="$rating->value">{{ $rating->label() }}</flux:select.option>
                            @endforeach
                        </flux:select>
                        <div class="flex gap-x-2">
                            <flux:button type="submit" class="w-full" variant="primary">Create</flux:button>
                            <flux:button class="w-full">Cancel</flux:button>
                        </div>
                    </div>
                </flux:card>
            </div>
        </div>
    </form>
</div>

@jeffchown
Copy link

I just used your layout (with your custom components commented out) + view file in my Flux2 test app and it works for me:

Image

If I think of anything else, I'll let you know.

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

Thanks! I will try some more things on my end and if I fix it I will let you know.

@dicktornfeldt
Copy link

dicktornfeldt commented Feb 19, 2025

Just wanted to let you know @jlarm that I have exactly the same issue and have tried all as above. However it's just on input labels that the margin-bottom is 0px instead of 12px. See attached image. I've tested to remove everything from the layout file and just let the input be left. But the issue persists.

Wtf, nvm, now a ran php artisan view:clear and the issue dissapeared.

Image

@jeffchown
Copy link

jeffchown commented Feb 19, 2025

For any visual issues, always a great first try: php artisan view:clear - especially after major updates (like TW4 and Flux 2)
Sometimes a browser cache clear will also help.

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

@dicktornfeldt Thanks for the info!

@dennisfransen
Copy link

dennisfransen commented Feb 19, 2025

@jlarm i happend to have the same issue. This fixed it for me.

I uninstalled @tailwindcss/forms from package.json.
Deleted @plugin '@tailwindcss/forms'; from app.css
php artisan view:clear
npm run build

Let me know if it worked for you! 👍

EDIT:
I did try to only do php artisan view:clear before i removed @tailwindcss/forms. I also deleted vendor and node_modules. This did not solve it for me.

I can provide some file snippets so you can compare if this doesn't solve it for you.

@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

@dennisfransen This really looked like the fix, unfortunately, it did not work. Some file snippets would be appreciated, thanks!

@dennisfransen
Copy link

dennisfransen commented Feb 19, 2025

@jlarm let me know if there is any particular file you want me to send.

/* app.css */
@import "tailwindcss";
@import '../../vendor/livewire/flux/dist/flux.css';

@custom-variant dark (&:where(.dark, .dark *));

@theme {
    --font-*: initial;
    --font-sans: Inter, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --color-accent: var(--color-sky-600);
    --color-accent-content: var(--color-sky-600);
    --color-accent-foreground: var(--color-white);
}

@layer theme {
    .dark {
        --color-accent: var(--color-sky-600);
        --color-accent-content: var(--color-sky-400);
        --color-accent-foreground: var(--color-white);
    }
}

@layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        border-color: var(--color-gray-200, currentColor);
    }
}

[x-cloak] {
    display: none !important;
}
/*package.json*/
{
    "private": true,
    "type": "module",
    "scripts": {
        "build": "vite build",
        "dev": "vite"
    },
    "devDependencies": {
        "@tailwindcss/postcss": "^4.0.7",
        "axios": "^1.7.4",
        "concurrently": "^9.0.1",
        "laravel-vite-plugin": "^1.2.0",
        "postcss": "^8.4.31",
        "tailwindcss": "^4.0.7",
        "vite": "^6.0.11"
    }
}
{{-- app.blade.php --}}
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="csrf-token" content="{{ csrf_token() }}">

        <title>{{ config('app.name', 'Laravel') }}</title>

        <!-- Fonts -->
        <link rel="preconnect" href="https://fonts.bunny.net">
        <link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />

        <!-- Scripts -->
        @livewireStyles
        @fluxAppearance
        @vite(['resources/css/app.css', 'resources/js/app.js'])
    </head>
    <body>

        ...

        @livewireScripts
        @fluxScripts
    </body>
</html>

@joshhanley
Copy link
Member

@jlarm thanks for reporting! I was trying to debug this issue with @dicktornfeldt on Discord and we couldn't work out what is was, but clearing the view cache did it. I suspect this isn't a Flux issue specifically and more an issue with the Tailwind v4 upgrade and the view cache and browser cache.

I'm going to leave this open for now, just so if anyone else is experiencing the issue or has a fix, can find it and comment here.

@joshhanley joshhanley changed the title Input badge spacing Input label and badge spacing missing after upgrade Feb 19, 2025
@jlarm
Copy link
Author

jlarm commented Feb 19, 2025

@joshhanley Not a problem, everything else is working great. Love all you guys do for Livewire!

@trungpv1601
Copy link

Same issue 🐛 upgrade from 1.0 to 2.0

@joshhanley
Copy link
Member

@jlarm and @trungpv1601 can you both try this:

  • deleting your vendor and node_modules folders
  • reinstalling composer install and npm install
  • run php artisan optimize:clear
  • run npm run build
  • then in your browser do a hard refresh cmd+shift+r on a Mac in Chrome to force the browser to re-download all assets

Then let us know how it goes, whether it fixes the issue or not?

If that doesn't work, can you then try a new component and page that only has this it it

<div>
    <flux:field>
        <flux:label badge="Required">Email</flux:label>

        <flux:input type="email" required />

        <flux:error name="email" />
    </flux:field>

    <flux:input label="Name" badge="required" />
</div>

And see if that works?

If that doesn't work, can you share your latest versions of your app.css, your layout file? Thanks!

@trungpv1601
Copy link

@jlarm and @trungpv1601 can you both try this:

  • deleting your vendor and node_modules folders
  • reinstalling composer install and npm install
  • run php artisan optimize:clear
  • run npm run build
  • then in your browser do a hard refresh cmd+shift+r on a Mac in Chrome to force the browser to re-download all assets

Then let us know how it goes, whether it fixes the issue or not?

If that doesn't work, can you then try a new component and page that only has this it it

Email
    <flux:input type="email" required />

    <flux:error name="email" />
</flux:field>

<flux:input label="Name" badge="required" />
And see if that works?

If that doesn't work, can you share your latest versions of your app.css, your layout file? Thanks!

I have no idea but it's working perfectly for me today.

No need to delete vendor and node_modules folders step.

Just follow the upgrade documents for TailwindCSS 4.0 and Flux 2.0 like yesterday.

Thank you so much 🎉

@jeffchown
Copy link

And you're sure there is no tailwind.config.js file hiding anywhere...

@joshhanley
Copy link
Member

@jringeisen and @jeffchown if you guys can’t work it out, I will pull the repo and have a look in the morning when I’m back on my computer, to see what I can find 🙂

@jeffchown
Copy link

@jringeisen And, forgive me for asking the obvious, after each of your edits, you're running php artisan view:clear then npm run build?

@jeffchown
Copy link

@jringeisen Do you have a postcss.config.js file?

@jeffchown
Copy link

jeffchown commented Feb 23, 2025

@jringeisen I've been deep diving a bunch of TW 4 GitHub and Stackoverflow issues...

If you don't have a postcss.config.js file, try npm install @tailwindcss/postcss, then create a postcss.config.js file with the following:

export default {
    plugins: {
        '@tailwindcss/postcss': {},
    },
};

then, good old, php artisan view:clear then npm run build and... 🤞🍀.

@jringeisen
Copy link

@jringeisen I've been deep diving a bunch of TW 4 GitHub and Stackoverflow issues...

If you don't have a postcss.config.js file, try npm install @tailwindcss/postcss, then create a postcss.config.js file with the following:

export default {
plugins: {
'@tailwindcss/postcss': {},
},
};
then, good old, php artisan view:clear then npm run build and... 🤞🍀.

No tailiwnd config file anywhere. The default laravel app has postcss so I removed it to see if that would fix it, no luck. Just re-installed it and added the postcss.config.js and ran view:clear and npm run build with no luck.

@jeffchown
Copy link

Thanks for trying. When I removed the postcss.config.js on my end, it 'broke' my styling, then when I re-added it, it all looked as expected, so I thought it might help on your end.

I'm clocking out for the evening. If I think of anything, I'll let you know.

Maybe @joshhanley can work some of his magic in the morning.

@jeffchown
Copy link

@jringeisen One last thing for the night - can you post your package.json when you get a chance?

@jringeisen
Copy link

@jeffchown here you go, thanks for looking into this by the way.

{
    "private": true,
    "type": "module",
    "scripts": {
        "build": "vite build",
        "dev": "vite"
    },
    "devDependencies": {
        "axios": "^1.7.4",
        "concurrently": "^9.0.1",
        "laravel-vite-plugin": "^1.2.0",
        "tailwindcss": "^4.0.8",
        "vite": "^6.0.11"
    },
    "dependencies": {
        "@tailwindcss/postcss": "^4.0.8",
        "@tailwindcss/vite": "^4.0.8"
    }
}

@jringeisen
Copy link

I'm at a loss. I did a fresh install again this time ensuring I was on node v20 and still the same results. I also stopped Herd and ran the laravel app via php artisan serve, still the same issue. I also only installed Flux, not Flux Pro to see if that made a difference, nope. Anyway, Taylor Otwell is releasing the new starter kits tomorrow so I should be good to go then, just sucks that I can't get it working.

@jeffchown
Copy link

jeffchown commented Feb 23, 2025

I admit, it's strange. The OCD in me is having a tough time letting it go ;)

This is my package.json (with your cloned repo), with the differences highlighted:

{
    "private": true,
    "type": "module",
    "scripts": {
        "build": "vite build",
        "dev": "vite"
    },
    "devDependencies": {
+        "@tailwindcss/postcss": "^4.0.8",
        "axios": "^1.7.4",
        "concurrently": "^9.0.1",
        "laravel-vite-plugin": "^1.2.0",
+        "postcss": "^8.4.31",
        "tailwindcss": "^4.0.8",
        "vite": "^6.0.11"
    },
    "dependencies": {
-        "@tailwindcss/postcss": "^4.0.8",
        "@tailwindcss/vite": "^4.0.8"
    }
}

Most notably is yours not having the postcss line.

If you're up for one last kick at the can, try matching mine (with the appropriate npm installs, etc.) and let's see if it makes a difference.

@jeffchown
Copy link

jeffchown commented Feb 23, 2025

I'm at a loss. I did a fresh install again this time ensuring I was on node v20 and still the same results. I also stopped Herd and ran the laravel app via php artisan serve, still the same issue. I also only installed Flux, not Flux Pro to see if that made a difference, nope. Anyway, Taylor Otwell is releasing the new starter kits tomorrow so I should be good to go then, just sucks that I can't get it working.

You've definitely tried everything.

Here's hoping the starter kits don't suffer the same issues on your local dev. 🤞
(and maybe they'll offer a clue or two)

@jeffchown
Copy link

jeffchown commented Feb 23, 2025

@jringeisen There are similar sounding issues in this TW issue on GitHub - suggesting TW update to 4.0.8 might be contributing to the issue: tailwindlabs/tailwindcss#16733

Some people who reverted to TW 4.0.7 found relief.

@jringeisen
Copy link

@jeffchown matched my package.json to yours, removed node_modules then reinstalled. Ran php artisan view:clear then npm run build and no luck. I also tried changing the tw version to every version before 4.0.8 and no luck. 🤷‍♂️

@jeffchown
Copy link

Wow. @jringeisen You really have tried everything.

I hope we eventually get to find out what is/was causing the problem.
The suspense/mystery is killing me 🤪

@joshhanley
Copy link
Member

joshhanley commented Feb 23, 2025

@jringeisen I've just pulled your repo and everything is working as expected for me.

Here is my current set up, so you can compare:

  • M1 MacBook Pro
  • Herd
  • PHP v8.3
  • Node v22.13
  • Npm v10.9

I just cloned your repo and did this:

  • composer install
  • cp .env.example .env
  • php artisan key generate
  • set DB_CONNECTION=sqlite in .env
  • php artisan migrate
  • npm install
  • npm run build
  • opened in browser and went to login page

This is what I get:

Image

My only suggestion would be to upgrade to node v22 to see if that changes anything.

Considering this basic repo is working for me and @jeffchown and not you, I would be surprised if the starter packs work when they are released.

@joshhanley
Copy link
Member

joshhanley commented Feb 23, 2025

For reference, these are the versions of everything that was installed by composer and npm when I pulled your repo, so I don't think it's a Tailwind version issue.

Image

@jringeisen
Copy link

@jringeisen I've just pulled your repo and everything is working as expected for me.

Here is my current set up, so you can compare:

  • M1 MacBook Pro
  • Herd
  • PHP v8.3
  • Node v22.13
  • Npm v10.9

I just cloned your repo and did this:

  • composer install
  • cp .env.example .env
  • php artisan key generate
  • set DB_CONNECTION=sqlite in .env
  • php artisan migrate
  • npm install
  • npm run build
  • opened in browser and went to login page

This is what I get:

Image My only suggestion would be to upgrade to node v22 to see if that changes anything.

Considering this basic repo is working for me and @jeffchown and not you, I would be surprised if the starter packs work when they are released.

Man, that is so crazy. I'm thinking about nuking my computer and starting all over. I just pulled the branch down and followed the steps as you laid out and still no luck. I made sure to upgrade node to v22 and ensure it was being used before installing.

@joshhanley
Copy link
Member

@jringeisen yeah seems crazy to me! It definitely has me curious as to what exactly is going on. #1167 seems like they're having a similar issue to you.

@joshhanley
Copy link
Member

@jringeisen do you have a global git ignore file? If so can you share it here?

@joshhanley
Copy link
Member

@jringeisen this sounds similar to your issue tailwindlabs/tailwindcss#16038

@jringeisen
Copy link

Ahhhhhhhhh @joshhanley that's it! I didn't know I had a global gitignore file lol. Here's the contents. When I removed everything and opened the browser the styles were loaded in.

.gitignore_global

client-info-modal.vue
client-create.vue
client-edit.vue
client-list.vue
client-show.vue
create-modal.vue
edit-modal-by-object.vue
error-handler.vue
pagination-limit.vue
index.blade.php
show.blade.php
AssistantServiceProvider.php
AssistantInterface.php
OpenAIPlatform.php

@joshhanley
Copy link
Member

@jringeisen ahh haha it was the index.blade.php you have in there, as that is what the button is called! When I copied that into my global git ignore, the button disappeared like you were seeing.

@jringeisen
Copy link

Thanks @joshhanley and @jeffchown for looking into this with me, man what a pain that was.

@joshhanley
Copy link
Member

@jringeisen no worries! Glad we got to the bottom of it!

@dennisfransen
Copy link

Damn guys... well done! 👏🔥

@jeffchown
Copy link

jeffchown commented Feb 23, 2025

@jringeisen @joshhanley Aha! Soooo glad we have an actual answer!

That's what came up when I was researching before I posted yesterday (#1118 (comment)) - Tailwind CSS will also skip scanning folders that have a .gitignore file in them.

https://tailwindcss.com/docs/detecting-classes-in-source-files#which-files-are-scanned

A very obscure (and lesser known) behaviour of TW4's @source that I'm sure will come up for other users. Now we know!

@joshhanley
Copy link
Member

joshhanley commented Feb 23, 2025

@jeffchown ooops I missed that note you made yesterday! Turns out you were already on top of it 😁 Makes sense that it happens, but definitely not easy to troubleshoot

@jeffchown
Copy link

@jeffchown ooops I missed that note you made yesterday! Turns out you were already on top of it 😁 Makes sense that it happens, but definitely not easy to troubleshoot

No worries - Great minds, @joshhanley ;) Was a determined (and stubborn ;) team effort! Way to go all 👍

Definitely a tricky one to troubleshoot - especially when a fresh app is created as part of the troubleshooting!

I just wanted to make sure everyone knew that even the presence of a .gitignore file in a directory can have the same effect as that directory being listed in a global .gitignore file. Two 'gotchas' to watch out for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants