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

navbar-item for <button> #3936

Open
ragonneau opened this issue Nov 19, 2024 · 0 comments
Open

navbar-item for <button> #3936

ragonneau opened this issue Nov 19, 2024 · 0 comments

Comments

@ragonneau
Copy link

This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework
I am sure this issue is not a duplicate

Description

First, thank you very much for the framework, very useful !

The navbar-item class is implemented for <a> and <div> but not for <button>. This would be a great feature, because it is common to have a logout button in a dropdown in the navigation bar, which is generally a POST.

Steps to Reproduce

I give here an example of a navbar with a logout button in a dropdown.

<nav class="navbar is-fixed-top">
    <div class="navbar-brand">
        <a class="navbar-item" href="#">
            <strong>
                My project
            </strong>
        </a>
        <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarMenu">
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
            <span aria-hidden="true"></span>
        </a>
    </div>
    <div id="navbarMenu" class="navbar-menu">
        <div class="navbar-end">
            <div class="navbar-item has-dropdown">
                <a class="navbar-link">
                    Welcome user
                </a>
                <div class="navbar-dropdown is-right">
                    <a class="navbar-item">
                        About
                    </a>
                    <hr class="navbar-divider">
                    <form action="..." method="post">
                        <button type="submit" class="navbar-item">
                            Logout
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</nav>

Expected behavior

From a user perspective, the "About" and "Logout" items in the dropdown should render exactly the same way.

Actual behavior

The placement, padding, etc, works fine, but the over effect is not working for the "Logout" button.

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

1 participant