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

Sidebar menu items wrap issue #478

Closed
projectorchid opened this issue May 21, 2019 · 6 comments
Closed

Sidebar menu items wrap issue #478

projectorchid opened this issue May 21, 2019 · 6 comments
Labels

Comments

@projectorchid
Copy link

image-2019-04-24-20-34-41-880

Is there a way not to wrap the menu item text under the icon and display the badge on first line itself?

@xidedix
Copy link
Member

xidedix commented May 21, 2019

hi @projectorchid
let's play around with styles, sth like:

 <li class="nav-item">
  <a class="nav-link d-flex" href="after.html">
    <i class="nav-icon fa fa-group align-self-center"></i>After school program
    <span class="badge badge-info align-self-start">337</span>
  </a>
</li>

@projectorchid
Copy link
Author

Thanks @xidedix
These menu items are dynamically added from database. The style fix works for the long menu links. But for shorter links like "Un Grouped" or "My First Group" the badge displays near the text, not right aligned.

@xidedix
Copy link
Member

xidedix commented May 22, 2019

what about:

<span class="flex-grow-1">My First Group</span>

to make it right for sidebar minimized add:

.sidebar-minimized .sidebar .nav-link {
    display: block !important;
}

@dimitor115
Copy link

dimitor115 commented Jun 28, 2019

I've got a similar issue. If the text of the nav-link is too long, it wraps under the icon. It looks quite bad.
image
My solution, is to chage nav-link display to flex and fix nav-icon padding. If you have better ideas, let me know!

.sidebar .nav-dropdown-items .nav-item .nav-link { 
     display: flex;
    .nav-icon { 
        padding-top:4px ;
     }
 }

After that, it looks much nicer!
image

@lichbx1
Copy link

lichbx1 commented Dec 11, 2019

I've got a similar issue. If the text of the nav-link is too long, it wraps under the icon. It looks quite bad.
image
My solution, is to chage nav-link display to flex and fix nav-icon padding. If you have better ideas, let me know!

.sidebar .nav-dropdown-items .nav-item .nav-link { 
     display: flex;
    .nav-icon { 
        padding-top:4px ;
     }
 }

After that, it looks much nicer!
image

thank you.

@stale
Copy link

stale bot commented Dec 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 5, 2020
@stale stale bot closed this as completed Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants