-
Notifications
You must be signed in to change notification settings - Fork 51
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
Components styling don't work as expected #1167
Comments
@lahoje Were you upgrading this app from Flux 1.0 to TW 4 + Flux 2.0? Or is it a new app? |
Hi and thanks for your reply, it's a new app from scratch. with following steps:
app.css @import 'tailwindcss';
@import '../../vendor/livewire/flux/dist/flux.css';
@custom-variant dark (&:where(.dark, .dark *));
@plugin '@tailwindcss/forms';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../views';
@theme {
--font-sans:
Figtree, ui-sans-serif, system-ui, Inter, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}
/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}
dashboard.blade.php <x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('Dashboard') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-xs sm:rounded-lg">
<div class="p-6 text-gray-900">
{{ __("You're logged in!") }}
<div class="mt-8 w-72">
<flux:calendar />
</div>
</div>
</div>
</div>
</div>
</x-app-layout> |
@lahoje Your issue may be related to: #1118 One thing... can you update one section of your view: -<div class="p-6 text-gray-900">
- {{ __("You're logged in!") }}
-
- <div class="mt-8 w-72">
- <flux:calendar />
- </div>
-</div>
+<div class="p-6 text-gray-900">
+ {{ __("You're logged in!") }}
+</div>
+
+<div class="mt-8 w-72">
+ <flux:calendar />
+</div> then:
and see if that makes any difference? You had the calendar nested in a div that set the text color and I want to make sure that isn't affecting the calendar. |
It made no difference, unfortunately. |
@lahoje thanks for reporting! This does seem a duplicate of #1118 but I'm going to leave this open as that thread is getting really long, so we will just do your debugging here. Can you create a simple page and just put |
@lahoje We just had a breakthrough in the related issue, do you have a global .gitignore file? |
@lahoje yep that looks good to me, so that suggest Flux styles are working correctly. Basically if you use Not sure why the calendar would be rendering like that with Are you able to push a test repo to GitHub that demonstrates the calendar issue so we can pull it and see if the same problem is happening for us? |
Great, It’s late night here in sweden. I’ll set up a repo tomorrow and notify you when it’s done.
Med vänliga hälsningar
Larry Höjer
…________________________________
Från: Josh Hanley ***@***.***>
Skickat: söndag 23 februari 2025 23:35:07
Till: livewire/flux ***@***.***>
Kopia: Larry Höjer ***@***.***>; Mention ***@***.***>
Ämne: Re: [livewire/flux] Components styling don't work as expected (Issue #1167)
@lahoje<https://github.com/lahoje> yep that looks good to me, so that suggest Flux styles are working correctly. Basically if you use @fluxAppearance, it will follow your system theme, so if your system is in dark mode, then the button will be white. But without @fluxAppearance it will default to light theme and be a black button.
Not sure why the calendar would be rendering like that with @fluxAppearance as the whole calendar should change. As @jeffchown<https://github.com/jeffchown> asked, do you maybe have a global git ignore file and if so, can you share it?
Are you able to push a test repo to GitHub that demonstrates the calendar issue so we can pull it and see if the same problem is happening for us?
—
Reply to this email directly, view it on GitHub<#1167 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHXLIRPEGJMPSXRTBMOW4ZD2RJEJVAVCNFSM6AAAAABXWRKQNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGE2TIMBUHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[joshhanley]joshhanley left a comment (livewire/flux#1167)<#1167 (comment)>
@lahoje<https://github.com/lahoje> yep that looks good to me, so that suggest Flux styles are working correctly. Basically if you use @fluxAppearance, it will follow your system theme, so if your system is in dark mode, then the button will be white. But without @fluxAppearance it will default to light theme and be a black button.
Not sure why the calendar would be rendering like that with @fluxAppearance as the whole calendar should change. As @jeffchown<https://github.com/jeffchown> asked, do you maybe have a global git ignore file and if so, can you share it?
Are you able to push a test repo to GitHub that demonstrates the calendar issue so we can pull it and see if the same problem is happening for us?
—
Reply to this email directly, view it on GitHub<#1167 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHXLIRPEGJMPSXRTBMOW4ZD2RJEJVAVCNFSM6AAAAABXWRKQNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGE2TIMBUHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@lahoje no worries! That'd be great, thanks 🙂 |
@joshhanley Good moring ☀️, here's the repo: https://github.com/lahoje/dokibas |
@joshhanley I just tested it again ( 9.40 am) and all of the sudden it worked, even with @fluxAppearance in the blade layout. Don't recall updating something 😊. Could it be something to do with the system dark/light thing? |
Flux version
v2.0.2 pro
Livewire version
v3.5.20
Tailwind version
v4.0.8
Browser and Operating System
Firefox on macos
What is the problem?
The components styling doesn't appear as it should. I've followed the installations instructions literally. If I remove the @fluxAppearance it seem to work. See attached images of a calendar component, first with @fluxAppearance and the second without @fluxAppearance.
Code snippets
app.blade.php
How do you expect it to work?
As it should...
Please confirm (incomplete submissions will not be addressed)
The text was updated successfully, but these errors were encountered: