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

Boost: Can not set Drawer Background with $drawer-bg scss variable

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.7.4, 3.8, 3.9
    • 3.7.5, 3.8.2
    • Themes
    • MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-67472-master
    • Hide
      1. Login as Admin
      2. Navigate to Site Administration > Appearance > Themes > Boost
      3. Click the “Advanced settings tab”
      4. In the “Raw Initial CSS” textarea add: “$drawer-bg: yellow;”
      5. Save changes
      6. Reload the page
      7. Verify the navdrawer background colour is now yellow.
      Show
      Login as Admin Navigate to Site Administration > Appearance > Themes > Boost Click the “Advanced settings tab” In the “Raw Initial CSS” textarea add: “$drawer-bg: yellow;” Save changes Reload the page Verify the navdrawer background colour is now yellow.

    Description

      Theres a SCSS variable called

      $drawer-bg
      

      which does essentially nothing in my eyes, as the drawer bg stays the same if it is set in "Raw initial scss". It is located in boost/scss/drawer.scss. If it should set the drawer background then the code in boost/scss/drawer.scss should be changed accordingly.

       

      For example from:

       

       

      /* Use a variable for the drawer background colors. */
      $drawer-bg: $gray-lighter !default;
       
      [data-region="drawer"] {
          position: fixed;
          padding: $drawer-padding-x $drawer-padding-y;
          width: $drawer-width;
          top: $fixed-header-y;
          height: calc(100% - #{$navbar-height});
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
          z-index: $zindex-dropdown - 1;
          background-color: darken($body-bg, 5%);
          -webkit-transition: right 0.5s ease, left 0.5s ease;
          -moz-transition: right 0.5s ease, left 0.5s ease;
          transition: right 0.5s ease, left 0.5s ease;
      }
      

       

      to

       

      /* Use a variable for the drawer background colors. */
      $drawer-bg: darken($body-bg, 5%) !default;
      //XOR
      $drawer-bg: darken($gray-lighter, 5%) !default;
       
      [data-region="drawer"] {
          position: fixed;
          padding: $drawer-padding-x $drawer-padding-y;
          width: $drawer-width;
          top: $fixed-header-y;
          height: calc(100% - #{$navbar-height});
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
          z-index: $zindex-dropdown - 1;
          background-color: $drawer-bg;
          -webkit-transition: right 0.5s ease, left 0.5s ease;
          -moz-transition: right 0.5s ease, left 0.5s ease;
          transition: right 0.5s ease, left 0.5s ease;
      }
      

       

       

       

      Attachments

        Activity

          People

            basbrands Bas Brands
            CarstenS CS
            Luca Bösch Luca Bösch
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Huong Nguyen, Bas Brands, Mathew May, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9/Mar/20

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m