F
Filament15mo ago
Thijmen

Logo centered in sidebar

Since when is the logo on the left like this? And is it still possible do make it centered?
32 Replies
toeknee
toeknee15mo ago
Since you enabled the sidebar collapisble? you can center it to the div it is in, but not to the large container above.
Thijmen
Thijmen15mo ago
I didn't have this problem before with collapsible sidebar.
toeknee
toeknee15mo ago
Screenshot of it before?
Dennis Koch
Dennis Koch15mo ago
The logo is on the left as long as I no it. The menu button was moved next to the logo
Thijmen
Thijmen15mo ago
Can't find any right now But on my local site i have version 2.17.17 And there it is centered On prod i have 2.17.31 And it is not centered there
toeknee
toeknee15mo ago
Ok can you screenshot both?
Thijmen
Thijmen15mo ago
You can also see the height above the logo has changed
Thijmen
Thijmen15mo ago
On both sides i have collapsible sidebar but hide the button with css on desktop viewsize
toeknee
toeknee15mo ago
Can you compare the classes on each of the containers/
Thijmen
Thijmen15mo ago
Yeah i just noticed that there is a new div there
Thijmen
Thijmen15mo ago
NEW
Thijmen
Thijmen15mo ago
Old
toeknee
toeknee15mo ago
There is your issue, just center all based in the div.
Thijmen
Thijmen15mo ago
And how would you do that? Because i can't target the new div
toeknee
toeknee15mo ago
You can usually target the div from the container divs. If you review up the top you can, failing that try a {margin: auto auto;}
Dan Harrin
Dan Harrin15mo ago
i dont think its ever been centered lol
Thijmen
Thijmen15mo ago
For collapsible or both?
Dan Harrin
Dan Harrin15mo ago
both
Thijmen
Thijmen15mo ago
Well non-collapsible was centered
Thijmen
Thijmen15mo ago
This image is from August 2022, and im pretty sure i didn't have custom css here to center it.
Thijmen
Thijmen15mo ago
In the top you can see it centered
Thijmen
Thijmen15mo ago
The logo also isn't centered vertically anymore.
Dan Harrin
Dan Harrin15mo ago
im pretty sure this wasnt default i dont like the way the centered logo looks send the code for your custom blade brand.blade.php
Thijmen
Thijmen15mo ago
This image is from (Dutch) Dennis, is this logo extra wide to align it this way?
Thijmen
Thijmen15mo ago
<img class="block dark:hidden h-10 w-full" src="{{ asset('/images/logo.svg') }}" alt="Logo"/>
<img class="hidden dark:flex h-10 w-full" src="{{ asset('/images/Logo_dark.svg') }}" alt="Logo"/>
<img class="block dark:hidden h-10 w-full" src="{{ asset('/images/logo.svg') }}" alt="Logo"/>
<img class="hidden dark:flex h-10 w-full" src="{{ asset('/images/Logo_dark.svg') }}" alt="Logo"/>
Dennis Koch
Dennis Koch15mo ago
I guess it was centered because it's a SVG with full width. That's default behaviour. Now the link might limit the width, because it's inline-block
Thijmen
Thijmen15mo ago
Yeah changing it to block fixes it.
Mark Chaney
Mark Chaney15mo ago
I agree though that unless a logo is just text, it looks pretty odd with the collapsible icon. I understand why it’s to the left though as that gives consistency to the animation, but still a bit awkward
awcodes
awcodes15mo ago
Yea. I just use css to move the icon to the right.
Dan Harrin
Dan Harrin15mo ago
create a full height and full width flex container to hold the imgs and center them there
Thijmen
Thijmen15mo ago
Also what could be the reason that i have no close menu button anymore on mobile? Seems that filament demo site also doesn't have that
Dan Harrin
Dan Harrin15mo ago
any more? i dont think it ever had that either you just click outside the menu or on a menu item