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

UIShell sidenav: submenu indentation wrong when icons and bx--side-nav--fixed #5889

Closed
1 of 2 tasks
wkeese opened this issue Apr 20, 2020 · 0 comments · Fixed by #5896
Closed
1 of 2 tasks

UIShell sidenav: submenu indentation wrong when icons and bx--side-nav--fixed #5889

wkeese opened this issue Apr 20, 2020 · 0 comments · Fixed by #5896

Comments

@wkeese
Copy link
Contributor

wkeese commented Apr 20, 2020

Indentation issue with sidenav submenu items in sidenav with icons when bx--side-nav--fixed set

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

The default submenu indentation (padding-left) CSS from _sidenav.scss is:

  .#{$prefix}--side-nav__menu a.#{$prefix}--side-nav__link {
    height: mini-units(4);
    min-height: mini-units(4);
    padding-left: mini-units(4);
    font-weight: 400;
  }

However, it adds more indent when the top level menu item has an icon:

  .#{$prefix}--side-nav__item.#{$prefix}--side-nav__item--icon
    a.#{$prefix}--side-nav__link {
    padding-left: mini-units(9);
  }

So far so good. But the CSS above gets overridden by this CSS, reverting the indentation back to 4:

  .#{$prefix}--side-nav--fixed
    .#{$prefix}--side-nav__menu
    a.#{$prefix}--side-nav__link {
    padding-left: mini-units(4);
  }

Note that the problem doesn't happen on https://react.carbondesignsystem.com/?path=/story/ui-shell--fixed-sidenav-w-icons because it doesn't set bx--side-nav-fixed, despite the name of the story.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants