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

Allow override of BS4 $theme-colors map in default.scss

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.6.4
    • 3.6.3, 3.7
    • Themes
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_36_STABLE
    • M65299_boost_theme-colors_override
    • Hide

      Test for theme Boost

      1. Login as admin
      2. Navigate to Site Administration > Appearance > Boost
      3. Click the Advanced setting tab
      4. Copy this scss in the Raw initial SCSS field: 

      $theme-colors: (
          primary: red
      );

      1. Save changes, then reload the page
      2. Verify Links and (previously blue) Buttons are now red

      Test for theme Classic

      1. Login as admin
      2. Site Administration > Appearance > Theme selector
      3. Click the Change theme button in the Default theme section
      4. Choose the Classic theme
      5. Navigate to Site Administration > Appearance > Classic
      6. Click the Advanced setting tab
      7. Copy this scss in the Raw initial SCSS field: 

      $theme-colors: (
          primary: green
      );

      1. Save changes, then reload the page
      2. Verify Links and (previously blue) Buttons are now green

       

      Show
      Test for theme Boost Login as admin Navigate to Site Administration > Appearance > Boost Click the Advanced setting tab Copy this scss in the Raw initial SCSS field:  $theme-colors: (     primary: red ); Save changes, then reload the page Verify Links and (previously blue) Buttons are now red Test for theme Classic Login as admin Site Administration > Appearance > Theme selector Click the Change theme button in the Default theme section Choose the Classic theme Navigate to Site Administration > Appearance > Classic Click the Advanced setting tab Copy this scss in the Raw initial SCSS field:  $theme-colors: (     primary: green ); Save changes, then reload the page Verify Links and (previously blue) Buttons are now green  

    Description

      The update to Bootstrap 4 stable for theme_boost in MDL-56511 included a change to allow overriding colour maps via map-merge() such as $theme-colors.

      This map-merge() change is also needed on the $theme-colors map in default.scss, otherwise child themes using Boost's default.scss cannot override $theme-colors definition in their own scsspre setting.

      For clarity: It seems that $theme-colors can be overriden in Boost's scsspre, but it doesn't work when using Boost's default.scss and a child theme's scsspre. Presumably theme makers could copy Boost's default.scss into their own theme, but that would need additional work when keeping up with changes to Boost.

      Attachments

        Activity

          People

            balchd Dave Balch
            balchd Dave Balch
            Bas Brands Bas Brands
            Andrew Lyons Andrew Lyons
            Janelle Barcega Janelle Barcega
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 50 minutes
                2h 50m

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.