Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-74868

New 4.0 secondary-navigation re-uses .nav-tabs class uneccesarily

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.0.1
    • None
    • None
    • MOODLE_400_STABLE

    Description

      Bootstrap has .navs that then can be specialized with .nav-tab, .nav-pill or styled differently by leaving those off.

      The new sub-menu navigation uses .nav-tab, but then removes all the nav-tab styling and replaces it. If someone tried to style the actual .nav-tabs (the ones that look like paper folder 'tabs') for use elsewhere then the styles would bleed over into these navs.

      Just removing the nav-tab should work fine and pick up the base nav styles:

      https://getbootstrap.com/docs/4.0/components/navs/#base-nav

      The moremenu CSS already adds the hover states and active underline.

      And the secondary-navigation would no longer need to override them:

       .secondary-navigation {
          max-width: $course-content-maxwidth;
          margin: 0 auto;
          padding-bottom: 15px;
          .navigation {
              border-top: 1px solid $nav-tabs-border-color;
              border-bottom: 1px solid $nav-tabs-border-color;
              height: calc(#{$moremenu-height} + 2px);
              background-color: $body-bg; 
              .nav-tabs {
                  border: none;
                  .nav-link {
                      border-radius: initial;
                  }
              }

      About half of that is just remove the styles added by nav-tab.

      I'd also recommend using a seperate variable for the border-top/bottom color, rather than re-use the tab one since these are navs, but not tabs in the standard theme.

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bawjaws David Scotson
            Amy Groshek, David Scotson, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Huong Nguyen, Bas Brands, Mathew May
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: