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

Add smooth scroll-behaviour to boost CSS

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      If we add the following CSS to our Boost SCSS, then we get smooth scroll behaviour everywhere when focusing thing.

      html {
        scroll-behavior: smooth;
      }
      

      This works when something calls focus(), or scrollIntoView, or when jumping straight to a bookmark and gives a smooth scroll giving an (IMO) more pleasing result for users.

      It's currently in Working Draft and works in Chrome and Firefox. No support in IE, Edge, or Safari just yet.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            dobedobedoh Andrew Nicols
            Participants:
            Component watchers:
            Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 minutes
                5m