-
Notifications
You must be signed in to change notification settings - Fork 47
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
Button with href AND inset renders as full width #801
Comments
@giacomovernoni Have you tried wrapping your |
@giacomovernoni Ignore my previous post - I can reproduce the issue and can confirm it still exists. |
@giacomovernoni thanks for reporting! So interestingly the problem is the same as what I fixed in PR #35 in that a button is an The fix in that PR was to make sure we were using The reason it is breaking now is because of the Inside the button component ->add($inset ? 'flex' : 'inline-flex') // inline-flex is weird with negative margins... So this means that using inset on a link button is causing it to be @calebporzio have you got any insight into what weirdness Volt component for easy reproduction: <?php
use Livewire\Volt\Component;
new class extends Component {
//
};
?>
<div class="mt-4 space-y-4">
<flux:button variant="ghost" inset>Button with inset</flux:button>
<flux:button variant="ghost" inset href="#">Button with inset and href</flux:button>
</div> |
We've merged a fix for this in PR #878 which just makes sure that inset is also using the |
This is similar to a previous issue, see:
Button gets full width with href
and
Ensure button and link button display the same
The issue can be temporarily solved by adding
class="inline-flex"
to the button with href and inset.The text was updated successfully, but these errors were encountered: