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

Topic highlight and anchor offsets interfere with each other in Boost

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.6.5, 3.7.1
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE

      Description

      Due to conflicting CSS rules, when you have a highlighted course topic, and you use the anchor link for that section, both the alignment of the anchor and the display of the highlight 'bar' to the left of the topic are incorrect.

      The highlight bar gets collapsed to 60px (instead of the height of the topic), and the alignment when clicking moves you the incorrect place (hiding the topic title).

       
      The conflicting rules are:
      From boost/scss/moodle/drawer.scss

      :target::before {
          content: " ";
          display: block;
          height: ($fixed-header-y + 10px); /* fixed header height*/
          margin-top: -($fixed-header-y + 10px); /* negative fixed header height */
          width: 1px;
          pointer-events: none;
      }
      

      and from boost/scss/moodle/course.scss

      .course-content .current::before {
          content: "";
          border-left: $brand-primary 2px solid;
          position: absolute;
          left: -$card-spacer-x;
          top: 0;
          bottom: 0;
      }
      

      The selector in drawer.scss selector was modified in MDL-62528, adding the :before, which I think was the point at which this problem arose. Although since then other changes have been mode in there.
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                emerrill Eric Merrill
                Participants:
                Component watchers:
                Bas Brands, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: