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

POLICY: Styling of base vs. bootstrapbase

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • 2.7
    • None
    • Policy, Themes
    • MOODLE_27_STABLE

    Description

      The intention of this policy is to define how we manage the usage of Bootstrap classes in core in the other base themes (Base/Canvas).

      It has been seen that now that we are using Bootstrap as default we are using Bootstrap classes in core, which is good and nice step forward the element library. But what happens with base?

      So far I noticed:

      1. The Bootstrap class and styles are NOT copied to base
      2. The Bootstrap class and styles are copied to base
      3. The Bootstrap class and styles are copied to base, but made more selector specific

      About #1

      As the styles are missing, case can potentially look really odd especially when the classes are playing with positioning.

      About #2

      I see Base as a scaffold for themes. If you browse Moodle using base you notice that colours are mostly absent, and that the bare minimum was used so that things are positioned where they should be, but without any styling.

      If we backport the Bootstrap rules to base one by one, we will end up with a proper Bootstrap in bootstrapbase, and a half-Bootstrap in base. Also, base will now have colours, and advanced styles such as shadows, rounded corners, etc... And those will be visible, and by default not differently styled, in all children themes.

      About #3

      Exactly the same thing than #2, but instead of being able to re-use Bootstrap classes you would have to re-define them again, and again, because the selectors are too specific.

      On one side you are sure that you will not mess up with existing themes that might be using the same classes. But on the other side it makes themers job impossible because they need to override all those specific selectors.

      What I am suggesting

      Close to #1, I would not backport Bootstrap rules to Base. But, if while testing on base, I realise that a bit of styling is required (and let's remind ourselves that base is a minimalist) then I would create the class and style it myself. Without colours, or fancy styles.

      That way:

      • We do not mess with existing themes
      • Base is still what it was, simple and a base
      • We do not end up with a base that randomely has bootstrap rules

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fred Frédéric Massart
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, 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: